在单个页面中添加多个更新面板 [英] Add more than one updatepanel in a single page
本文介绍了在单个页面中添加多个更新面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在页面中添加了ScriptManager和ScriptManagerProxy。
我添加了文本框并删除了下拉列表框每个脚本..
当我选择任何一个dd列表框时,
两个文本框值都被清除。
请帮助我如何避免这种情况。
以下是我的ScriptManager代码。
Hi,
I have added ScriptManager and ScriptManagerProxy in my page.
I have added text box and drop ddown list boxes in each script..
When I select any one of the dd list box,
both text box values are getting cleared.
Pleas help me how to avoid this.
Below is my ScriptManager code.
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table class="style7" style="border: thin groove #C0C0C0" width="460px" >
<tr>
<td>
<asp:Panel ID="Panel1" runat="server" Width="222px" align="center">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</asp:Panel>
</td>
</tr>
<tr>
<td align="center">
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
<asp:ListItem>Overlall DAT Compliance</asp:ListItem>
<asp:ListItem>Laptop DAT Compliance</asp:ListItem>
<asp:ListItem>Server DAT Compliance</asp:ListItem>
<asp:ListItem>Desktop DAT Compliance</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
下面是我的ScriptManagerProxy代码
Below is my ScriptManagerProxy code
<asp:ScriptManagerProxy ID="ScriptManager2" runat="server">
</asp:ScriptManagerProxy>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Panel ID="Panel5" runat="server" Width="222px" align="center"
style="z-index: 5; left: 17px; top: 615px; position:absolute; height: 31px; width: 210px">
<table class="style7" style="border: thin groove #C0C0C0" width="460px" >
<tr>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center">
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
onselectedindexchanged="DropDownList2_SelectedIndexChanged">
<asp:ListItem>Overlall DAT Compliance</asp:ListItem>
<asp:ListItem>Laptop DAT Compliance</asp:ListItem>
<asp:ListItem>Server DAT Compliance</asp:ListItem>
<asp:ListItem>Desktop DAT Compliance</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
推荐答案
请参阅 页面 http://msdn.microsoft.com/en-us/library/bb398867.aspx [ ^ ]
add
UpdateMode =有条件在你的更新面板中
add
UpdateMode="Conditional" in your update panel
Quot e:
< asp:updatepanel id =UpdatePanel1runat =serverupdatemode =条件xmlns:asp =#unknown>
<asp:updatepanel id="UpdatePanel1" runat="server" updatemode="Conditional" xmlns:asp="#unknown">
这篇关于在单个页面中添加多个更新面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文