Triggering an UpdatePanel with a trigger located outside of the UpdatePanel

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.
 
M

miher

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,836
Latest member
BuyBlissBitesCBD

Latest Threads

Top