I have a Custom Server Control [A].
I'd like one of the properties of this control to point to another (custom) control [B] on the same webform. (A&B both being extended databoundobjects)
I'm not strictly binding the 2 in a traditional way, the reference will simply be used by clientside Javascript so that when an event on [A] occurs, it knows to make a responding action on [B].
At the moment, I've got it [A] set up with a textual property that can be set to [B]'s ID, in the properties window at design time.
[A] simply renders this value to the client as a Javascript variable. Perfect.
However, wanting to be 'tidy' , I'd rather the user be led to a 'browser' dialogue where they can select the other target control explicity.
Typing the ID in manualy is messy and prone to mistype/error.
So ... I guess I'm looking to see how I can set up a 'Properties Window' entry, that when seelcted, bring up a list of available controls form the webform.
Hope I've explained all of that ok ...
Many Thanks
simonB2010
Member
49 Points
21 Posts
Custom User Server Control
Aug 02, 2011 02:00 PM|LINK
K, so, well , erm ...
I have a Custom Server Control [A].
I'd like one of the properties of this control to point to another (custom) control [B] on the same webform.
(A&B both being extended databoundobjects)
I'm not strictly binding the 2 in a traditional way, the reference will simply be used by clientside Javascript so that when an event on [A] occurs, it knows to make a responding action on [B].
At the moment, I've got it [A] set up with a textual property that can be set to [B]'s ID, in the properties window at design time.
[A] simply renders this value to the client as a Javascript variable. Perfect.
However, wanting to be 'tidy' , I'd rather the user be led to a 'browser' dialogue where they can select the other target control explicity.
Typing the ID in manualy is messy and prone to mistype/error.
So ... I guess I'm looking to see how I can set up a 'Properties Window' entry, that when seelcted, bring up a list of available controls form the webform.
Hope I've explained all of that ok ...
Many Thanks
Simon
Imar_Spaanja...
Contributor
2784 Points
481 Posts
ASPInsiders
MVP
Re: Custom User Server Control
Aug 02, 2011 02:46 PM|LINK
Hi Simon,
You may want to check out this article: http://imar.spaanjaars.com/305/how-do-i-display-a-list-with-control-ids-in-a-controls-property It's a bit dated but I think it all still works.
Cheers,
Imar
My Blog - My Company
simonB2010
Member
49 Points
21 Posts
Re: Custom User Server Control
Aug 02, 2011 05:49 PM|LINK
Blooming star !
Thank you so much :)