tags:

views:

91

answers:

2

This video shows how to add validation for a textbox: http://msdn.microsoft.com/en-us/vbasic/bb643821.aspx

What about date ? I can't make it work for date.

+1  A: 

The first thing that I would suggest is to use a MaskedTextBox. This will take about 0 effort on your part and it will ensure that your users type the date in a certain format. You can then attempt to parse the date into a DatTime and, if that fails, display a clue to the user as to why.

Ed Swangren
+1  A: 

Hi programmernovice,

You'll have to use a regex validator or a custom validator (and add a supplementary Javascript/code-behind method) to validate the format of a user's input.

More info can be found here:

Robert W