当前位置: 代码迷 >> ASP.NET >> 正在开发的项目要用ajax,在用户控件中用updatepanel的有关问题,请大家帮帮忙
  详细解决方案

正在开发的项目要用ajax,在用户控件中用updatepanel的有关问题,请大家帮帮忙

热度:2125   发布时间:2013-02-25 00:00:00.0
正在开发的项目要用ajax,在用户控件中用updatepanel的问题,请大家帮帮忙
在用户控件中用updatepanel,控件中添加timer定时刷新,如果页面中添加多个用户控件,只有第一个控件能刷新,其它的就不行了,有什么解决办法吗?



------解决方案--------------------------------------------------------
用trigger
HTML code
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">            <ContentTemplate>                <%= DateTime.Now %>                <asp:Button ID="Button1" runat="server" Text="Button" />            </ContentTemplate>            <Triggers>                <asp:PostBackTrigger ControlID="Button2" />            </Triggers>        </asp:UpdatePanel>
  相关解决方案