Nicolas,
You are on the right track. Instead of using GetProperty on the Type
instance, use the GetField method on the type containing the control. This
will return the individual fields. Once you have that, you can get an
object that represents the value in the field and get the property on THAT
object, and then set it.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- nick(dot)paldino=at=exisconsulting<dot>com
"Nicolas" <nl*****@hotmail.com> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
Is there a way to have a handle on a control having only the control name
So I dont have to loop through all the controls nested on the form.
checking for the control name = my string
this could be long and heavy on memory
Assuming the control name is "btn_Save"
How to get to ctr being the required control so that I can apply changes
ctr.GetType().GetProperty(oProperty).SetValue( ctr,newVal, null);