我的网站上有两个更新面板,每个都有一个中继器。是否可以只刷新其中一个,而不需要在另一个内部重新绑定中继器?谢谢你的帮助。
这是其中一个UpdatePanel:
<UpdatePanel runat="server" id ="upd1" UpdateMode = "condicional'>
<ContentTemplate>
<repeater>
</Contentemplate>
</updatePanel>
<updatePanel runat="server" id="ipd2" >
<COntentTemplate>
<LinkButton>
</ContentTemplate>
</UpdatePanel>
当我单击“链接”按钮时,两个更新程序都会被更新:(
如果想要UpdatePanel不更新就必须借助javascript,但是为了在第一个div中将jQuerycarousele应用于中继器,我必须运行那个javascit,所以这个方法行不通。在更新第二个updatePanel时,是否可以不调用js代码?
Set the UpdateMode
for the UpdatePanel
to Conditional
and set up appropriate triggers that should cause updates.
Set UpdateMode="Conditional"
and when you want to update Call UpdatePanel1.Update();
to update specific updatepanel
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<asp:Repeater runat="server" ID="rptContents">
</asp:UpdatePanel>
Set the update Mode of the Inner Update panel to Conditional. Inner update panels are automatically updated by the outer update panels.