Asp.net 如何在更新面板中的Gridview中找到按钮id?
我找不到“更新”按钮的id,是否可以 查找gridview中的更新按钮id,该网格为 在更新面板内。 脚本寄存器在页面加载时写入。我写这封信是为了 当前更新按钮在第二次单击时启动 ASPX代码Asp.net 如何在更新面板中的Gridview中找到按钮id?,asp.net,vb.net,gridview,Asp.net,Vb.net,Gridview,我找不到“更新”按钮的id,是否可以 查找gridview中的更新按钮id,该网格为 在更新面板内。 脚本寄存器在页面加载时写入。我写这封信是为了 当前更新按钮在第二次单击时启动 ASPX代码 <asp:UpdatePanel ID="UpdatePanelSubMeter" runat="server"> <ContentTemplate> <EditItemTemplate> <asp:Button ID="btn_Upd
<asp:UpdatePanel ID="UpdatePanelSubMeter" runat="server">
<ContentTemplate>
<EditItemTemplate>
<asp:Button ID="btn_Update" Style="background-color: #B2DE94; width: 40px" CausesValidation="false" runat="server" OnClientClick="return fnCheck(this);" Text="Update" CommandName="Update" />
</EditItemTemplate>
</asp:UpdatePanel>
尝试删除
For Each gvr As GridViewRow In GridSubMeter.Rows
If gvr.RowType = DataControlRowType.DataRow Then
Dim button As Button = CType(gvr.FindControl("btn_Update"), Button)
If Not (button Is Nothing) Then
ScriptManager.GetCurrent(Me).RegisterPostBackControl(button)
从页面加载并将其粘贴到末尾的BindGridSubMeter
。试试这个
For Each gr As GridViewRow In Grid_Records.Rows
Dim bt As Button = DirectCast(gr.Cells(0).FindControl("btn_Update"), Button)
Dim here As bt.properties
下一步有错误吗??????以及您试图对ScriptManager执行的操作。GetCurrent(Me)。RegisterPostBackControl(按钮)更新按钮在单击调用代码的事件时第二次启动?按钮在pageload@Imad上不显示任何内容
For Each gr As GridViewRow In Grid_Records.Rows
Dim bt As Button = DirectCast(gr.Cells(0).FindControl("btn_Update"), Button)
Dim here As bt.properties