asp.net ajax 一个页面的多个UpdatePanel同时刷新的时候相互影响,这个问题怎么解决?求高手帮忙。
asp.net ajax 一个页面的多个UpdatePanel同时刷新的时候相互影响,这个问题怎么解决?求高手帮忙。代码入下:
asp.net ajax UpdatePanel --------------------编程问答-------------------- 建议最好是只用一个Updatepanel
<asp:ScriptManager ID="svctabScriptManager" runat="server" EnablePartialRendering="true" AsyncPostBackTimeout="500000000"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Always">
<ContentTemplate>
<div class="content">
<asp:UpdatePanel ID="ajaxSVCUpdate" runat="server" UpdateMode="Conditional" >
<Triggers>
<asp:AsyncPostBackTrigger ControlID="addRolesButton" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="removeRolesButton" EventName="Click" />
</Triggers>
<ContentTemplate>
<div style="width:47%;float:left">
<asp:Label ID="availRolesLabel" runat="server" CssClass="emphasisedlabel" Text="Available Roles"></asp:Label><br />
<asp:ListBox id="availRolesListBox" runat="server" SelectionMode="Multiple" DataValueField="name" Height="350px" Width="320px"></asp:ListBox>
</div>
<div style="width:6%;float:left;padding-top:140px;">
<asp:Button ID="addRolesButton" runat="server" Text=">" OnClick="AddRole_Click" CausesValidation="false" /><br /><br /><br />
<asp:Button ID="removeRolesButton" runat="server" Text="<" OnClick="RemoveRole_Click" CausesValidation="false" />
</div>
<div style="width:47%;float:left">
<asp:Label ID="assignedRolesLabel" runat="server" CssClass="emphasisedlabel" Text="Assigned Roles"></asp:Label><br />
<asp:ListBox id="assignedRolesListBox" ValidationGroup="AddUser" runat="server" SelectionMode="Multiple" DataValueField="name" Height="350px" Width="320px"></asp:ListBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" ValidationGroup="AddUser" runat="server" Display="Dynamic"
ControlToValidate="assignedRolesListBox" SetFocusOnError="True" meta:resourcekey="AddUserResource6">
</asp:RequiredFieldValidator>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<%--<span class="hintspacer"> </span> --%>
<asp:UpdateProgress ID="UpdateProgress3" AssociatedUpdatePanelID="ajaxSVCUpdate" runat="server">
<ProgressTemplate>
<span class="hintspacer"> </span>
Processing.....<br /><span class="hintspacer"> </span>
<asp:Image ID="Image2" ImageUrl="~/App_Themes/experience2/images/processbar.gif" runat="server" />
</ProgressTemplate>
</asp:UpdateProgress>
<div class="clear"></div>
</div>
<div class="content">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
<Triggers>
<asp:AsyncPostBackTrigger ControlID="addOrgButton" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="removeOrgButton" EventName="Click" />
</Triggers>
<ContentTemplate>
<div style="width:47%;float:left">
<asp:Label ID="availOrgLabel" runat="server" CssClass="emphasisedlabel" Text="Available Organizations"></asp:Label><br />
<asp:ListBox id="availOrgListBox" runat="server" SelectionMode="Multiple" DataTextField="name" DataValueField="erid" Height="150px" Width="320px"></asp:ListBox>
</div>
<div style="width:6%;float:left;padding-top:50px;">
<asp:Button ID="addOrgButton" runat="server" Text=">" OnClick="AddOrg_Click" CausesValidation="false" /><br /><br /><br />
<asp:Button ID="removeOrgButton" runat="server" Text="<" OnClick="RemoveOrg_Click" CausesValidation="false" />
</div>
<div style="width:47%;float:left">
<asp:Label ID="assignedOrgLabel" runat="server" CssClass="emphasisedlabel" Text="Assigned Organizations"></asp:Label><br />
<asp:ListBox id="assignedOrgListBox" runat="server" SelectionMode="Multiple" DataTextField="name" DataValueField="erid" Height="150px" Width="320px"></asp:ListBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" ValidationGroup="AddUser" runat="server" Display="Dynamic"
ControlToValidate="assignedOrgListBox" SetFocusOnError="True" meta:resourcekey="AddUserResource6">
</asp:RequiredFieldValidator>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<span class="hintspacer"> </span>
<asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
<ProgressTemplate>
Processing.....<br />
<span class="hintspacer"> </span>
<asp:Image ID="Image1" ImageUrl="~/App_Themes/experience2/images/processbar.gif" runat="server" />
</ProgressTemplate>
</asp:UpdateProgress>
<div class="clear"></div>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="saveChangeButton" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="cancelChanges" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="ResetPasswordButton" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
补充:.NET技术 , ASP.NET