Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assigning value to buttons
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01126134
Message ID:
01127191
Views:
13
If you need to loop through all the buttons this code should do just that:
foreach(Control o in this.Controls)
{
	if (o.GetType() == typeof(Button))
	{
		MessageBox.Show("Button with text: " + o.Text);
	}
	else
	{
		MessageBox.Show("Not a button");
	}
}
C# is not more complicated it is just different :)

HTH,
Einar


>what i want to do is to loopo through about 21 buttons on a pocket pc
>
>
>I will then name these buttons to match a field in a table
>
>it is actually to build a pocket pc sysyem for ordering drinks etc
>
>i will need about 3 or pages of these buttons so that I can place orders for drinks and food. I will call these either by a tab or by another set of buttons
>
>Eventually i want to be able to book rooms tec.
>
>O know exactaly how to do it in VFP but it appears to be so much more complicated in C#
>
>but the isnt anything - i am told i cant visually sub class buttins and forms
>
>Knd regards
>
>
>Richard
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform