Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > UpdatePanel trigger in different usercontrol.

Reply
Thread Tools

UpdatePanel trigger in different usercontrol.

 
 
zb
Guest
Posts: n/a
 
      11-08-2007
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.

 
Reply With Quote
 
 
 
 
PJ on Development
Guest
Posts: n/a
 
      11-08-2007
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 <(E-Mail Removed)> 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.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Triggering an UpdatePanel with a trigger located outside of the UpdatePanel Nathan Sokalski ASP .Net 1 06-15-2009 06:23 PM
Nested UpdatePanel with trigger in parent mohaaron@gmail.com ASP .Net 1 12-11-2007 12:59 PM
UpdatePanel Trigger - DefaultButton in ASCX Problem... koraykazgan Software 0 08-14-2007 02:46 PM
refresh an updatePanel in an other updatePanel fran_j_diaz@yahoo.fr ASP .Net 3 08-08-2007 06:30 AM
trigger updatepanel from gridview button =?Utf-8?B?Sm9l?= ASP .Net 0 08-08-2007 05:02 AM



Advertisments