Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get all the lables
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01179415
Message ID:
01179472
Views:
6
This message has been marked as a message which has helped to the initial question of the thread.
Most likely the problem is that the controls you're trying to read are not at the form level but contained lower in the hierarchy (like a Master Page container or a panel). In which case you need to recursively dig into the containers or start parsing at the correct container to start with.

+++ Rick ---


>Hi all,
>
>How could I get all the labels in the webform? I have tried the following but I couln't get any label, am I missing out something? Any advice would be appreciated, thanks.
>
>
>For Each lblControl As Control In Me.Form.Controls
>    If TypeOf lblControl Is Label Then
>       ' Do something
>    End If
>Next
>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform