update panel triggered by other ascx

Last post 11-01-2006 7:17 PM by vineetc. 2 replies.

Sort Posts:

  • update panel triggered by other ascx

    09-23-2006, 2:14 AM
    • Loading...
    • sigit
    • Joined on 09-23-2006, 5:33 AM
    • Posts 1

    hi.., I am beginner in ASP .NET

    I have problem with UpdatePanel :

    I have one page with two web user control (ascx) , I put a treeview in first ascx and a textbox in second ascx, I put the textbox in an UpdatePanel, and I want to trigger that UpdatePanel by the treeview , how can I do this? , please help

     thanks....
     

     

  • Re: update panel triggered by other ascx

    11-01-2006, 5:24 PM
    • Loading...
    • nootn
    • Joined on 03-19-2006, 10:35 PM
    • Posts 2

    Assuming that the treeview acsx is placed on the ascx with the text box, you could try and expose a public event from the treeview ascx, raise that event when the relevant tree view event is raised, then you should be able to make that a trigger for the update panel..

     I do not have time to try that out at the moment but its worth a shot..

    Cheers.

  • Re: update panel triggered by other ascx

    11-01-2006, 7:17 PM
    • Loading...
    • vineetc
    • Joined on 06-23-2006, 7:19 PM
    • Posts 44

    In the user control which has the update panel, you can add the id of the second user control as a trigger target. In this way, any control which is
    inside the second user control would act as a trigger target for the update panel in the first user control.

    So the code can be something like this: 

     <Triggers>
            <atlas:AsyncPostBackTrigger ControlID="WebUserControl2_1" />
     </Triggers>

    Assuming that  "WebUserControl2_1" is the id of the second user control.

    For TreeView Specific: If you have populateondemand set to true for the treeview which is acting as a trigger target,
    than you might encounter an invalid state exception bug. We are working towards fixing it.

    vineetc

     



     

     

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter