Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically obtaining a reference to Buttons (C#)
Message
From
27/05/2004 13:53:14
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00907871
Message ID:
00907875
Views:
6
Hi Neil,

there's a Controls member in the page. I imagine you can iterate through it (foreach) and check for the control's type... if it's a button, you cast it to a button, and do what must be done. Did that make sense?? :)


>I have 3 Buttons on a web form, btn1, btn2 and btn3. I would like to loop thru a for-loop and set the Text property for each, namely 1, 2 and 3 respectively. Can someone please suggest a way to do it. I don't know how to get a reference to each button programmatically.
Claudio Lassala
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform