468,253 Members | 1,297 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,253 developers. It's quick & easy.

Changing properties at runtime.

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?
Nov 17 '05 #1
1 1259
"Tobe" <an*******@discussions.microsoft.com> wrote in message
news:2b*****************************@phx.gbl...
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.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Stefan Finzel | last post: by
reply views Thread by anil_goel45419 | last post: by
1 post views Thread by Nick via .NET 247 | last post: by
3 posts views Thread by cwertman | last post: by
2 posts views Thread by tfsimes | last post: by
reply views Thread by jwallis | last post: by
3 posts views Thread by samcogan | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.