I have a grid view that returns a image button in the first column and i need to get the value of the second column in the datagrid to pass that value to back to beable to edit the record.
I also set up a datakeyname using that same field name from the database.
here is my code:
Protected Sub GridView2_RowEditing(ByVal
sender As Object, ByVal e As System.Web.UI.WebControls.
GridViewEd
itEventArg
s) Handles GridView2.RowEditing
Dim billid As Integer
billid = GridView2.SelectedRow.Cell
s(2).Text
Response.Redirect("main.as
px?mode=ed
it&billid=
" & billid)
End Sub
I get a null excetion on this line everytime
billid = GridView2.SelectedRow.Cell
s(2).Text
what is the problem?
Please help
Thanks
jcook
Start Free Trial