UpdatePanel trigger in different usercontrol.

Z

zb

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

PJ on Development

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
 

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,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top