Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent to SETALL
Message
From
17/12/2014 13:58:53
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 5.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01612364
Message ID:
01612374
Views:
53
>>Hey Gang...
>>
>>Is there an equivalent to the SetAll Method for a c# WebForm? Or, do I have to iterate through the form objects?
>
>You would have to iterate over the controls.
>
>Something like:
>
>
>Iterate(Master.FindControl("ContentPlaceHolder1"));
>
>public void Iterate(Control container)
>{
>    foreach (var control in container.Controls)
>    {
>        // Do something here
>    }
>}
>
>
>You could make it recursive as well, if necessary.

Thanks!
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Reply
Map
View

Click here to load this message in the networking platform