Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to ForEach Page controls?
Message
From
13/11/2006 14:33:53
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
Miscellaneous
Thread ID:
01169266
Message ID:
01169275
Views:
9
>I am looking at the properties of the Page object but don't seem to find how to scan through the controls that this object has. I want to find all controls that have a property .Text. Is Page the right object?

Once you have a reference to the object, you can use an approach such as the following:
            For Each loControl In loControlGenericControl.Controls
                If TypeOf loControl Is System.Web.UI.HtmlControls.HtmlForm Then
                    Return CType(loControl, System.Web.UI.HtmlControls.HtmlForm)
                End If
            Next
This is just an example. You would need to adjust the code to fit your own needs.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform