Triggering an UpdatePanel with a trigger located outside of the UpdatePanel

  • Thread starter Thread starter Nathan Sokalski
  • Start date Start date
N

Nathan Sokalski

I have an UpdatePanel that I want to trigger using a control that is located
outside of the UpdatePanel. Here is my current code:

<asp:TextBox ID="txtMyTextBox" runat="server" AutoPostBack="True"/>
<asp:UpdatePanel ID="updSearch" runat="server" ChildrenAsTriggers="False"
UpdateMode="Conditional">
<ContentTemplate>
<%--Content getting updated--%>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="txtMyTextBox"
EventName="TextChanged"/>
</Triggers>
</asp:UpdatePanel>

With the current code, the server-side events get executed (I ran the
debugger to check), but the browser does not get updated. If I place the
TextBox (which is my trigger) inside the ContentTemplate, everything works
great. What am I doing wrong? Any help would be appreciated. Thanks.
 
Nathan Sokalski said:
I have an UpdatePanel that I want to trigger using a control that is
located outside of the UpdatePanel. Here is my current code:

<asp:TextBox ID="txtMyTextBox" runat="server" AutoPostBack="True"/>
<asp:UpdatePanel ID="updSearch" runat="server" ChildrenAsTriggers="False"
UpdateMode="Conditional">
<ContentTemplate>
<%--Content getting updated--%>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="txtMyTextBox"
EventName="TextChanged"/>
</Triggers>
</asp:UpdatePanel>

With the current code, the server-side events get executed (I ran the
debugger to check), but the browser does not get updated. If I place the
TextBox (which is my trigger) inside the ContentTemplate, everything works
great. What am I doing wrong? Any help would be appreciated. Thanks.
Hi,

Can You please clarify what type of update You would like to do ?
-Zsolt
 
Back
Top