C# 如何防止在gridview上回发
我有一个gridview,当我想通过单击gridview中的“编辑”来编辑行时,它会导致回发 如何防止编辑时回发?C# 如何防止在gridview上回发,c#,gridview,postback,edit,autopostback,C#,Gridview,Postback,Edit,Autopostback,我有一个gridview,当我想通过单击gridview中的“编辑”来编辑行时,它会导致回发 如何防止编辑时回发?使用Ajax更新面板控件,示例代码。。这可能对你有帮助。。 use Ajax Update Panel Control, Sample code.. this may helpful to you.. <asp:UpdatePanel ID="grdUpdatePanel" runat="server" UpdateMode="Conditional"> &l
使用Ajax更新面板控件,示例代码。。这可能对你有帮助。。
use Ajax Update Panel Control, Sample code.. this may helpful to you..
<asp:UpdatePanel ID="grdUpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="grdItemDetails" runat="server">
-- your code --
-- your code --
-- your code --
</asp:gridView>
</ContentTemplate>
</asp:updatePanel>
--你的代码--
--你的代码--
--你的代码--
我假设每行都有一个编辑按钮。单击编辑按钮,您可以填充控件或数据输入表单,而无需回发。Gridview的示例
在此事件中,在“编辑”按钮上添加单击属性
参考资料
使用
Update面板
避免Gridview事件的回发
。确保使用UpdateMode=“Conditional”
参考资料