c# - easy way change a control property by having it's id? -
is there direct way change, lets textbox
text when know called textbox1
?
i know can loop through it's container controls , find control , access question is, there easier (more direct ) this?
looping drawback when form has hundreds of textboxes on it.
i want done using code behind.
you can use page.findcontrol() name of control.
so example, access text property of textbox1 with: ((textbox)page.findcontrol("textbox1")).text
Comments
Post a Comment