Reputation: 3323
I would like to ask a theoritical question. Assuming that an application is using both ASP.NET and Linq, which approach to validation do you consider to be better, validation using the ASP Validation Controls, or validation through the Linq to SQL classes with any code additions that may be required?
Upvotes: 1
Views: 80
Reputation: 63964
The asp.net controls do validation client and server side whereas Linq (or code in general) are for doing validation server side only. Since is good practice to do validation on both sides, I wouldn't pick one or the other but maybe use both. As a matter of taste, I prefer JQUERY to perform validation on the client side and normal code to perform validation on the server side.
I dislike the asp.net validation controls because they require a lot of markup on the page.
Upvotes: 1