I'm not sure what the problem is, R. The method I provided works fine for me from a Web Form when in a Master Page. It also works for me when being called from a UserControl inside a Web Form inside a Master Page.
I'm not sure what the problem is, R. The method I provided works fine for me from a Web Form when in a Master Page. It also works for me when being called from a UserControl inside a Web Form inside a Master Page.
jmurrayhead
If you agree, give me rep.
If you like it here...throw us a few bones to help support us.
Referencing back to your foreach loop example, an easier way to ensure the control is a TextBox (for example):
Code:TextBox tb = ctl as TextBox; if (tb != null) { // It's a text box, so do textboxy things to it. }
Wolffy
.-- ----- ..-. ..-. -.--
Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Void where prohibited by law. Not valid in California. Your mileage may vary.
I was just on that idea Wolffy!
I just changed a <div> to a, <aspanel> and have looped through the controls inside that and it worked.
Will have a look at the code you posted and try that out as well. Not sure if a blanket .Enabled=false will work, but I'll see what happens..![]()
Bookmarks