title: Image not being displayed in my mvc application
body: <p>I have an image tag among a table of several other tds</p>
  
  <pre><code>&lt;table class="MyClass"&gt;
      &lt;tr&gt;
          &lt;td&gt;
              @Html.LabelFor(m =&gt; m.ShopName)
          &lt;/td&gt;
          &lt;td&gt;
              @Html.TextBoxFor(model =&gt; model.ShopName, new { @class = "form-control", id = "myid1", @readonly = true, @Enabled = "False" })
          &lt;/td&gt;
          &lt;td&gt;
              @Html.TextBoxFor(model =&gt; model.ShopName, new { @class = "form-control", placeholder = "Enter ShopName", id = "myid2", @maxlength = "200" })
              @Html.ValidationMessageFor(model =&gt; model.ShopName)
          &lt;/td&gt;
          &lt;td class="myclass2" rowspan="3"&gt;
              &lt;a data-toggle="modal" data-target="#cardDialog" href="#"&gt;&lt;img src="~/Content/dist/img/card.svg" id="imgId"&gt;&lt;/a&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>In the <code>document.ready</code> i am using the model property <code>ImagePath</code> to assign the img src to the image id <code>imgId</code></p>
  
  <pre><code>$(document).ready(function () 
  {
      var imgpth = @Html.Raw(Json.Encode(Model.ImagePath));
      $('#imgId').attr('src',imgpth);
  });
  </code></pre>
  
  <p>I am getting the path from the database ,</p>
  
  <pre><code>imgpth:`D:\\Myproject\\ResponseImages\\1005\\100526122016151240_1005_0_261216_15_39_53.JPEG`
  </code></pre>
  
  <p>Let me tell you that the path above is in a different folder from my current application. </p>
  
  <p>i.e. the application running on the server is in folder <code>D:\\MVCProject\\...
  </code>
  where as the images are in the folder <code>D:\\Myproject\\...</code></p>
  
  <p>But it is not displaying the image, rather it is displaying the default image that is assigned to the image control itself.</p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>This is my controller code where i am getting the path from,</p>
  
  <pre><code>public ActionResult Index()
  {
      ResponseObj = new ModelResponseDetails();
      //Some other controls data
      ResponseObj.ShopName=ds.Tables[18].Rows[0]["ShopName"].ToString();
      ....
      ....
      ....
      ResponseObj.ImagePath = ds.Tables[18].Rows[0]["ImagePath"].ToString();
      return View(ResponseObj);
  }
  </code></pre>
  
  <p>and 
  ds.Tables[18].Rows[0]["ImagePath"].ToString() has <code>D:\Myproject\ResponseImages\1005\100526122016151240_1005_0_261216_15_39_53.JPEG</code>
  Can some one tell if there is something wrong with my approach, either the way the path is being assigned to the <code>imgpth</code> variable or the jquery code etc??</p>