title: how to retrieve an image from database using image URL and insert it in grid view in vb. net?
body: <p>how to retrieve an image from database using image URL and insert it in grid view in vb. net  ??</p>
  
  <p>thats my data base table </p>
  
  <p>i have 3 columns in table image (ID as int , imageName as varchar , imageURL as varchar(max) i want to insert the image in a grid view but when i run this code i only get the last image in my table everytime </p>
  
  <p>thats my code: </p>
  
  <pre><code>Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  '---------------------------------------------------------------------------
  Dim dt As New DataTable()
  Dim strConnString As [String] = System.Configuration.ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString()
  Dim strQuery As String = "select * from image"
  Dim con As New SqlConnection(strConnString)
  Dim cmd As New SqlCommand(strQuery, con)
  Dim sda As New SqlDataAdapter()
      cmd.CommandType = CommandType.Text
      cmd.Connection = con
      Try
          con.Open()
          sda.SelectCommand = cmd
          sda.Fill(dt)
          GridView1.DataSource = dt
          GridView1.DataBind()
      Catch ex As Exception
          Response.Write(ex.Message)
      Finally
          con.Close()
          sda.Dispose()
          con.Dispose()
      End Try
  End Sub
  </code></pre>