Setting web custom control properties at design time

N

N Kumar

I am developing a Web custom control whose properties (such as text) I would
like to map to other control properties (such as textbox1.text) or variables
of the web form at design time. Is this possible?
 
N

N Kumar

Thanks Teemu.

But I am not looking to access the child controls within the composite
control. This is definitely possible as you indicated.

What I am looking for is, I have a, say composite control with property say
Text. Now when a developer uses my control and tries to assign the Text
property through Property window, I would like to show him/her, the other
Textbox names in that web form. Say the developer has assigned (mapped) to
Textbox1, at runtime, the Text property of the composite control should take
the text value from Textbox1.

Is such a mapping possible?
 
N

N Kumar

Thanks Teemu.

But I am not looking to set the property value from child controls of the
composite control. This is very much possible as you indicated.

What I am trying to do is, say, I have a composite control with a property
Text. Now when a developer uses my control, and when he/she tries to assign
the Text property through the property window, I would like to show him a
list which has names of other Textboxes in the Web form. Now say, the
developer has assigned (mapped) it to Textbox1, then at runtime, the Text
property of Textbox1 should be assigned to the Text property of the composite
control, during initialization of the Web form.

Is this possible?
 
T

Teemu Keiski

Hi,

basically providing a list of controls can be done with a custom type
converter, when it would pick IDs of other controls and set such into the
property.Is that what you mean? For example similar when you set
ControlToValidate of a validator control. it shows you list of all controls
having ValidationProperty attribute applied. Yes, such is done with a custom
type copnverter.
 

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,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top