comuncate web custom controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi to all....

I have a webform and inside 2 webcontrols like this....

Webform.aspx
|----------------------------------------------------
| Webcontrol1 |
| ____ |
| | | |
| |___ | |
| Webcontrol2 |
| _____________ |
| | | |
| | | |
| |____________| |
----------------------------------------------------

The webcontrol1 its a web custom control that create some links...
The webcontrol2 its some dinamic part, for example must show data from a database....
My dude is, how its the way to obtain that when you click in a link of the webcontrol1, the webcontrol2 show information depending the link... I dont know how to comunicate web custom controls....

Thanks to all
Josema.
 
If you want this behavior to occur on the client side you'll need to
use some Javascript and DHTML.This is one way for the two controls to
communicate but you'll need to be careful with the ids you use to
manipulate objects in the other control.

A cleaner solution would be to post back to the server and "bubble"
the event from WebControl1 up to the page. Then the page can take the
nessecary steps (method calls, property changes) on Webcontrol2.

Take a look at "Bubbling an Event"
http://msdn.microsoft.com/library/d...us/cpguide/html/cpconbubblingcommandevent.asp

HTH,
 
Back
Top