Unable to cast object of type System.Data.DataTable to type in ASP.Net.GridViewRow
BindGrid2005()
Dim row As GridViewRow = CType(Session("Customers"), GridViewRow)
Private Sub BindGrid2005()
Dim conn As String = ConfigurationManager.ConnectionStrings("UNIFORMConnectionString").ConnectionString
Using con As SqlConnection = New SqlConnection(conn)
Using cmd As SqlCommand = New SqlCommand("SELECT itemcode, stockitem as item, itemsize,colour FROM shopitems where itemcode='" & itemcode2 & "'", con)
Using sda As SqlDataAdapter = New SqlDataAdapter(cmd)
Using dt As DataTable = New DataTable()
sda.Fill(dt)
Session("Customers") = dt
End Using
End Using
End Using
End Using
End Sub