Triggering an UpdatePanel with a trigger located outside of the UpdatePanel

Discussion in 'ASP .Net' started by Nathan Sokalski, Jun 13, 2009.

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

    http://www.nathansokalski.com/
     
    Nathan Sokalski, Jun 13, 2009
    #1
    1. Advertising

  2. Nathan Sokalski

    miher Guest

    "Nathan Sokalski" <> az alábbiakat írta a következõ
    üzenetben news:uc3wtR#...
    > 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
    >
    > http://www.nathansokalski.com/

    Hi,

    Can You please clarify what type of update You would like to do ?
    -Zsolt
     
    miher, Jun 15, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kristoffer Arfvidson
    Replies:
    7
    Views:
    604
    Shiv Kumar
    Jan 21, 2004
  2. Jesper Stocholm
    Replies:
    1
    Views:
    692
    =?Utf-8?B?RFdT?=
    Mar 30, 2006
  3. Sam Samson

    Triggering an UpdatePanel question

    Sam Samson, Feb 21, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    487
    Michael Nemtsev [MVP]
    Feb 21, 2008
  4. Nathan Sokalski

    Triggering an UpdatePanel using JavaScript

    Nathan Sokalski, Jun 12, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    336
    miher
    Jun 15, 2009
  5. Hannes

    triggering callback from "outside"

    Hannes, Mar 6, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    197
    Ala Qumsieh
    Mar 7, 2004
Loading...

Share This Page