Changing properties at runtime.

T

Tobe

We want to change the autopostback properties
(serverside) of all of the dropdownlistboxes on the
page. I am trying to loop through the
Request.Form.Items, but I can't seem to get more the the
current text value of the controls. How can I get the
controls themselves?
 
J

John Saunders

Tobe said:
We want to change the autopostback properties
(serverside) of all of the dropdownlistboxes on the
page. I am trying to loop through the
Request.Form.Items, but I can't seem to get more the the
current text value of the controls. How can I get the
controls themselves?

The Page.Controls collection hold all controls which are directly within the
page. Each control in that collection has its own Controls collection. This
allows you to recursively go through all the controls on the page to look
for DropDownList's.

Of course, you could also get a list of the ids of the DropDownLists and use
FindControl to find them.
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top