更新面板不能正常工作 [英] Update panel is not working fine

查看:71
本文介绍了更新面板不能正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在gridview中使用了分页但是对于第一次单击事件它工作正常但是对于第二个事件gridview没有更新。请帮忙...

I have used paging in a gridview but for the first click event it is working fine but for the second event gridview is not updating. Please help...

推荐答案

根据你的描述,我看到你在updatepanel异步回发时使用了Response.Write。

我们都知道在异步回发期间我们不能使用Response.Write。如果你想在gridview分页或排序时使用它。



我认为你应该将它设置为updatepanel的PostBackTrigger。如下所示



According to your description, I see that you were using the Response.Write when the updatepanel async post back.
As we all know that we can't use Response.Write during an asynchronous postback. If you want to use it when gridview paging or sorting.

I think you should set it as PostBackTrigger of updatepanel. Like below

<triggers>
          <asp:postbacktrigger controlid="GridView1" xmlns:asp="#unknown" />
 </triggers>


这篇关于更新面板不能正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆