访问另一个tabpanel的控件以进行ajax更新 [英] access control of another tabpanel for ajax update
问题描述
我可以访问.aspx中tabpanel内的ddlUrgency控件。我希望从它外面的另一个触发器访问它。
我可以在aspx page.something中执行此操作,例如< asp:AsyncPostBackTrigger ControlID =pnlHeaderddl .Urgency/>
这里是代码...
< asp:Panel ID =pnlHeaderrunat =server>
< asp:UpdatePanel ID =UpUrgencyrunat =server>
< ContentTemplate>
< asp:DropDownList ID =ddlUrgencyrunat =serverAutoPostBack =TrueWidth =100%
CssClass =dropdownOnSelectedIndexChanged =ddlUrgency_SelectedIndexChanged />
< / ContentTemplate>
< / asp:UpdatePanel>
can i access ddlUrgency control that is inside a tabpanel in .aspx. I want to access it form a another trigger that is outside to it.
Can i do it in aspx page.something like <asp:AsyncPostBackTrigger ControlID="pnlHeaderddl.Urgency" />
here is the code...
<asp:Panel ID="pnlHeader" runat="server">
<asp:UpdatePanel ID="UpUrgency" runat="server" >
<ContentTemplate>
<asp:DropDownList ID="ddlUrgency" runat="server" AutoPostBack="True" Width="100%"
CssClass="dropdown" OnSelectedIndexChanged="ddlUrgency_SelectedIndexChanged" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpPriority" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="lnkEs" runat="server" Text="Approve" OnClick="lnkEscalate_Click" OnClientClick="return confirmation();" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlUrgency" />
</Triggers>
</asp:UpdatePanel
谢谢,
Rahul
thanks,
Rahul
推荐答案
您只能从更新面板中的控件触发异步回发。虽然,您可以从事件处理程序调用另一个更新面板上的Update方法来刷新HTML。
You can trigger asynchronous postbacks only from the controls that are present in the update panel. Although, you can call Update method on another update panel from the event handler to refresh the HTML.
这篇关于访问另一个tabpanel的控件以进行ajax更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!