How To Get Control Property in Code using string...

ChubbyArse

Member
Joined
Jun 10, 2003
Messages
19
Hi,

How can I get a controls property value in code, by using a string value of the propertyname.

Eg. In VB6 i would have

strProp = "Text"
ctl.Properties(strProp)

How can I do this in .Net.

I have a class which contains a control - could be combobox, textbox.
In the currentvalue property I want to return the bound value of the control.
For a textbox it would be ctl.text for a combobox it woul be .SelectedValue

Is there an alternative way to return the value

Thanks
Alex
 
Back
Top