I'm trying to pass the cell value from a selected row in a grid. I can't seem to get it to work correctly. I can pass a specified row by using .Rows(0).Cells(0).Text but not a selected row.
any help would be appreciated
Thanks
Private Sub dg_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles dg.RowCommand
If (e.CommandName = "Select") Then
Session("Value") = dg.SelectedRow.Cells(0).Text
Response.Redirect("NewForm.aspx")
End If
End Sub
any help would be appreciated
Thanks
Private Sub dg_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles dg.RowCommand
If (e.CommandName = "Select") Then
Session("Value") = dg.SelectedRow.Cells(0).Text
Response.Redirect("NewForm.aspx")
End If
End Sub