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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -