在同一页面中有两个更新面板的问题 [英] Probleme with two update panel in same page

查看:103
本文介绍了在同一页面中有两个更新面板的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在这样的同一页面上使用两个updatepanel时



更新面板1

When i am using two updatepanel on same page like this

Update Panel 1

<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:Timer runat="server" ID="UpdateTimer" Interval="3000"    OnTick="UpdateTimer_Tick" />
            <h2>
                <asp:Label runat="server" Font-Size="Small" Font-Names="verdana" ID="lblmsg" />
            </h2>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="UpdateTimer" EventName="Tick" />
        </Triggers>
    </asp:UpdatePanel>





更新面板2



Update Panel 2

 <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
<asp:DropDownList ID="_ddlDist" ClientIDMode="Static" runat="server" Style="background-color: #DEDFDE;"
                        AutoPostBack="true" CssClass="ddl" OnSelectedIndexChanged="_ddlDist_SelectedIndexChanged" CausesValidation="True"
                        data-rel="chosen" required >
                    </asp:DropDownList>
 </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="_ddlDist" EventName="SelectedIndexChanged" />
        </Triggers>
    </asp:UpdatePanel>









如果我们可以点击下拉列表并等待3秒以后它会自动选择光标位置项目



推荐答案

为什么需要两个更新面板。最好使用一个更新面板
Why do you need two update panel. Better use one update panel


这篇关于在同一页面中有两个更新面板的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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