Man*_*hah 1 c# asp.net gridview
现在,我将重定向到同一页面,以便在网格视图中显示更新的值。但是我想做到这一点停留在同一页面上。我正在使用列表作为数据源而不是任何数据库。
尝试使用UpdatePanel
<asp:UpdatePanel ID="UpdtPnlForGrdVw" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ...></asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
Run Code Online (Sandbox Code Playgroud)
当我们将UpdateMode设置为Conditional时,意味着
我们将
UpdtPnlForGrdVw手动更新内容。
将数据绑定到gridview后使用
UpdtPnlForGrdVw.Update()
Run Code Online (Sandbox Code Playgroud)
更新updatepanel的内容,在您的条件下将是gridview。
您也可以使用JavaScript进行此操作,请检查/sf/answers/432414391/,请记住,如果您尝试使用链接中的解决方案,则无需使用开启器。
| 归档时间: |
|
| 查看次数: |
11967 次 |
| 最近记录: |