i am enabling the user using my asp.net application to add data into a sql server 2008 database.
what is the best way to insert data and be able to validate things like empty fields, integers vs strings?
i am currently using formview to insert the data. how do i validate user input?
Use a validation jQuery plugin for front end validation.
This is the one I use a lot. http://bassistance.de/jquery-plugins/jquery-plugin-validation/
Then in c# create a partial class of your model and use DataAnnotations to do some more in depth validation.
So from here you can pretty much do any validation you would ever need.
Here are two examples of RequiredFieldValidators we used in a project once.
The RegularExpressions validator is the one you want to check against string vs int etc or to validate phone number, postcode or email;