yea thats the way I usually do it, except this piece of code was not written by me and the controls are jumbled everywhere in no logical order. looks like I'll just do it the old fashion way.
I believe you're looking for something such as:
protected void Page_Load(object sender, EventArgs e)
{
foreach (Control thisControl in this.form1.Controls)
{
//Do something
}
}
This will loop through all the controls in form1 on the page.
Yup! the easiest way to go is using the Panels.
or else you can use a recursive loop to make all the controls invisible.
0 comments:
Post a Comment