如何获取特定点击链接按钮的索引ID到网格视图中的下一页?
我的代码:我在这里使用隐藏字段
If e.CommandName = "facilitywell" Then
Dim routeId As String = CType(gView.Rows(indexNum).FindControl("lblpid"), Label).Text
'CType(gView.Rows(indexNum).FindControl("hfRouteid"), HiddenField).Value
Response.Redirect("~/frmRouteFacilityWell.aspx?routeId=" + routeId
源页码:
<asp:LinkButton ID="lbRouteFacilityWell" runat="server" CommandName="facilitywell">FacilityWell</asp:LinkButton>
答案 0 :(得分:1)
lblpid= gView.SelectedRows(0).Cells("lblpid").Value
试试这个