Controlling a dropdown list from a separate user control
I have one form, with 2 user controls. How can I get the procedures on uc2
to modify a drop down list on uc1?
I tried various versious of this in uc2:
The end result being a user selects something in uc2, I want the drop down
list in UC1 to be updated as a result.
Re: Controlling a dropdown list from a separate user control
If a usercontrol is not independent (which it isn't in this case), I
would probably go for raising an event. A container which knows about
the relevant usercontrols could then be a "mediator", e.g: take care of
handling an event of 1 control and doing stuff with another control.
I can see several cases where you'd like to be able to do stuff in 1
usercontrol based on input from another usercontrol. For that reason,
we (Variomatic) created a solution with a connection mechanism. This
allows you to connect different "webparts" (which in the end are equal
to usercontrols). Usercontrols can handle events of consumer connection
points, which are raised when a provider connection point provides
"data". You can read more about this on
Both Sharepoint and ASP.NET 2.0 have a connection mechanism aswell,
although I personally dislike Sharepoint's implementation (too much
|All times are GMT. The time now is 11:01 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.