UpdatePanel trigger in different usercontrol.

Discussion in 'ASP .Net' started by zb, Nov 8, 2007.

  1. zb

    zb Guest

    Scenarion:
    In an ASPX page I have a user control embedded (actually embedded in
    MasterPage), based on completion of a AJAX call in the user control it
    needs to update a Grid view which is actually another user control.

    I have been able to do this by keeping the grid view user control
    inside an update panel with a hidden trigger button. On my AJAX call
    completion in the first user control I use client script to simulate a
    click on the hidden button to update the grid view.

    But, this is a nightmare especially for maintenance and update. In
    actuality, this is no less than a hack!

    Is there a better way of doing this?

    Thanks.
    zb, Nov 8, 2007
    #1
    1. Advertising

  2. Hi,

    Let me see if I understood you correctly.

    You have a control in the MasterPage that update the contents of
    another control inside the Page contained in the Contents Panel?

    IF I understood you correctly the problem with this approach is that
    the MasterPage has no way to knowing what's inside the Containing
    page, just as well as the Page cannot know what's inside the
    MasterPage.

    True you can use the Master property, casting it to the desired
    MasterPage class and works with all its properties, but the problem
    remains that the controls inside the Page cannot (natively) call
    methods in the MasterPage.

    So the hack you're using is, as far as I'm aware of, the only solution
    for your scenario.

    Just out of curiosity: Why does this control is in the MasterPage if
    it updates the contents of another Page? Usually the MasterPage is
    used to provide common functionality through several different pages,
    and hardly interacts with the contents pages.

    Regards,

    Paulo Santos
    http://pjondevelopment.50webs.com

    On Nov 8, 4:18 am, zb <> wrote:
    > Scenarion:
    > In an ASPX page I have a user control embedded (actually embedded in
    > MasterPage), based on completion of a AJAX call in the user control it
    > needs to update a Grid view which is actually another user control.
    >
    > I have been able to do this by keeping the grid view user control
    > inside an update panel with a hidden trigger button. On my AJAX call
    > completion in the first user control I use client script to simulate a
    > click on the hidden button to update the grid view.
    >
    > But, this is a nightmare especially for maintenance and update. In
    > actuality, this is no less than a hack!
    >
    > Is there a better way of doing this?
    >
    > Thanks.
    PJ on Development, Nov 8, 2007
    #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. Replies:
    3
    Views:
    478
    Rob Meade
    Aug 8, 2007
  2. =?Utf-8?B?Sm9l?=

    trigger updatepanel from gridview button

    =?Utf-8?B?Sm9l?=, Aug 8, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    695
    =?Utf-8?B?Sm9l?=
    Aug 8, 2007
  3. Replies:
    1
    Views:
    410
    Braulio Diez
    Dec 11, 2007
  4. Jeff
    Replies:
    1
    Views:
    1,113
    bruce barker
    Nov 12, 2008
  5. Nathan Sokalski
    Replies:
    1
    Views:
    586
    miher
    Jun 15, 2009
Loading...

Share This Page