Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何防止在gridview上回发_C#_Gridview_Postback_Edit_Autopostback - Fatal编程技术网

C# 如何防止在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

我有一个gridview,当我想通过单击gridview中的“编辑”来编辑行时,它会导致回发

如何防止编辑时回发?

使用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”


参考资料