Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 26, 2012 05:24 AM by roshan605
Apr 26, 2012 04:33 AM|LINK
have to use server side . So what is the best practice ? doing both ?
Apr 26, 2012 04:55 AM|LINK
Best practice is to validate the input @ both place.
- at the Client side which will help user to identity if he has entered wrong data, with error messages, highlights etc.
- at Server (@ Entity level OR @Page level - you have to decide the approach that suite to you) : this will ensure that your business logic is dealing with proper data.
Imagine the data is coming to you from multiple sources like Web Service Clients, Browsers etc. If you dont put validation in Server Side, you might end up with working on wrong data.
Apr 26, 2012 05:22 AM|LINK
It's always better to validate inputs both at the client side and server side. Similarly while retrieving data from DB it's always a normal practise to chech IsDBNull at the server side so that unwanted runtime exceptions can be avoided.
Apr 26, 2012 05:24 AM|LINK