Add image to GridView's Cell
<p>I want to add image to GridView cell with below code but doesn't show image</p>

<pre><code>//aspx
 &lt;asp:TemplateField HeaderText="image"&gt;
      &lt;ItemTemplate&gt;
          &lt;asp:Image ID="img" runat="server" Width="100px" Height="100px" /&gt;
      &lt;/ItemTemplate&gt;
</code></pre>

<h2>     </h2>

<pre><code>//.cs -&gt; In page_Load

for (int i = 0; i &lt; GridView1.Rows.Count; i++)
{
      Image img = (Image)GridView1.Rows[i].FindControl("img");
      img.ImageUrl = path of image;
 }//for
</code></pre>
