Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric Input
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
01156834
Message ID:
01156893
Views:
25
>Is there a method for allowing only numeric input in PocketPC (or even C#)
>
>If you are enetring numbers in a text box all you want to do is prevent any other key workin (Other than Return and dpoint)
>
>Worked out my problem with to.upper
>
>Richard

Something like this should work. I haven't tested this in a PPC app.
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
	if (!char.IsDigit(e.KeyChar))
	{
		e.Handled = true;
	}
}
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform