I need to write simple page with 3 textBox
1. textBox1 ==> contain number only
2. textBox2 ==> contain Email address
3. textBox3 ==> contain user name only
I want to make some validation check on each textBox – and in case there is some problem with the user input – to make the textBox border to be in red color and show right message about the error.
How can i do it ?
Thanks for any help.
Here is a sample: SimpleValidation
It makes use of DataAnnotations so you can set your validation in the attribute.
Here is the code:
MainPage.cs
MainPage.xaml
DataModel.cs:
HTH