当前位置: 代码迷 >> ASP.NET >> UpdatePanel中的Button执行过之后,UpdatePanel之外的Button点击都无反应,该如何解决
  详细解决方案

UpdatePanel中的Button执行过之后,UpdatePanel之外的Button点击都无反应,该如何解决

热度:5238   发布时间:2013-02-25 00:00:00.0
UpdatePanel中的Button执行过之后,UpdatePanel之外的Button点击都无反应
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
  <ContentTemplate>
  <asp:Label ID="lblText" runat="server" Text="" Style="width: 60px"></asp:Label>  
  <asp:Button ID="btn" runat="server" Text="取号" OnClick="btn_Click" />
  </ContentTemplate>
</asp:UpdatePanel>

点击btn这个Button之后,执行btn_Click事件,把从数据库中取出来的值付给lblText,赋值是正常的,但是这个执行完之后,页面上其它的按钮无论怎么点击都没有反映了,请问高手这是怎么回事?我的页面上也没有别的什么东西,只放了一个GridView还有其它的一些TextBox控件,不过这些都不包含在UpdatePanel 里面。

------解决方案--------------------------------------------------------
C# code
 <tr>                <td style="width: 175px; text-align: right;">                    行业选择:</td>                <td style="text-align: left">                    <asp:UpdatePanel id="UpdatePanel1" runat="server">                        <contenttemplate>                    <asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged">                    </asp:DropDownList>&nbsp;<asp:DropDownList id="DropDownList4" runat="server"></asp:DropDownList></contenttemplate>                        <Triggers>                            <asp:AsyncPostBackTrigger ControlID="DropDownList3" EventName="SelectedIndexChanged" />                        </Triggers>                    </asp:UpdatePanel></td>            </tr>//   <Triggers>这个触发的属性去配置一下看看,点你的UpdatePanel 控件 然后属性窗口的<Triggers>(Collection)那里
------解决方案--------------------------------------------------------
C# code
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
------解决方案--------------------------------------------------------
很奇怪,在UpdatePanel外的不会有影响的啊
再多贴点代码看看!
------解决方案--------------------------------------------------------
呵呵 你把那些东西都放在 UpdataPanel里面看看 可能是没有回发操作吧一块被UpdataPanel限制了.
  相关解决方案