title: How to display image inside gridview template field without using handler class?
body: <p>I want to display image within template field of the gridview. I want to know how can I pass Image url for the Image control.
  This is what I am doing-
  ASPX Page:</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" Width="1000px" CellPadding="4" 
                      ForeColor="#333333" GridLines="None" AutoGenerateColumns="False"&gt;
                      &lt;AlternatingRowStyle BackColor="White" ForeColor="#284775" /&gt;
                      &lt;Columns&gt;
                          &lt;asp:TemplateField&gt;
                              &lt;ItemTemplate&gt;
                                  &lt;asp:Image ID="Image1" runat="server" Height="122px" 
                                      ImageUrl="" Width="148px" /&gt;
                                  &lt;br /&gt;
                              &lt;/ItemTemplate&gt;
                              &lt;ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="300px" /&gt;
                          &lt;/asp:TemplateField&gt;&lt;/asp:GridView&gt;
  </code></pre>
  
  <p>.CS Code:</p>
  
  <pre><code>public void show()
  {
      try
      {
          dt = g1.return_dt("select * from tbl_item_post where Ref_No is not null order by company");
          if (dt.Rows.Count &gt; 0)
          {
              pic1 = Convert.ToString(dt.Rows[0]["image_url"]);
              adsource = new PagedDataSource();
              adsource.DataSource = dt.DefaultView;
              adsource.PageSize = 10;
              GridView1.DataSource = adsource;
              GridView1.DataBind();
          }
          else
          {
              GridView1.DataSource = null;
              GridView1.DataBind();
          }
      }
      catch (Exception ex)
      {
          ex.ToString();
      }
  }
  </code></pre>
  
  <p>Please Guide me how to do this.</p>