i have a button in gridview whose command name is “hold” i want when i click n hold button of first row then the whole row values will be transfererd to default2.aspx …
and if i click the hold button of gridview second row then the second row value will be transferred to Default2.aspx ,,how to do that ?
i m using that …but it always transfer the 1st row value even i select first last or middle row ..in gridview ….
whats wrong in this code ?
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
For Each myRow As GridViewRow In GridView1.Rows
'Find the checkbox
Dim lab5 As Label = DirectCast(myRow.FindControl("Label5"), Label)
If e.CommandName = "feedback" Then
Me.Response.Redirect("~/view_feedback.aspx?" & "serv_code=" & lab5.Text.ToString)
End If
Next
End Sub
try this code