2

如何在网格视图中获取特定单击链接按钮到下一页的索引 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>
4

1 回答 1

1
 lblpid= gView.SelectedRows(0).Cells("lblpid").Value

尝试这个

于 2013-08-08T12:25:39.320 回答