By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,601 Members | 1,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,601 IT Pros & Developers. It's quick & easy.

enable all controls in a web form (1.1)

P: n/a
hi all,

is there a way to enable all controls in a web form?
something like

for each control in page.controls
control.enabled = true
next

i tried the one above, but that did not give me the .enabled
property...

TIA,
Chris
Jan 17 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Page.Controls is a collection of System.Web.UI.Control items. There is no
property Enabled for this type. You can typecast the items to
System.Web.UI.WebControls.WebControl which is the base class for all web
controls. This class does have Enabled property. Of cause, you should make
sure that the controls on the page are indeed WebControls.

Eliyahu

"Chattanooga" <ro***@gmx.at> wrote in message
news:0s********************************@4ax.com...
hi all,

is there a way to enable all controls in a web form?
something like

for each control in page.controls
control.enabled = true
next

i tried the one above, but that did not give me the .enabled
property...

TIA,
Chris

Jan 17 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.