Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent to SETALL
Message
 
À
17/12/2014 11:54:04
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 5.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01612364
Message ID:
01612370
Vues:
57
>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.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform