Dear Sir/ Mam,
Kindly provide me solution for Validate record during update record in MVC4. I am using Entity framework with Linq.
Thanks in advance.
Thanks
Sudhir
Cell +91-9555289718
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Feb 4, 2013, 6:41 AM
are you doing client side validation or serverside validation?
below link is help you to doing validation end to end.
http://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspx
generally Add and end is share common page so if validation working add time it must work @ the time of edit.
Sudhir SharmaPosted Feb 4, 2013, 4:42 AM
Jignesh TrivediPosted Feb 4, 2013, 3:38 AM
is it work when you add new record?
if not please refer above mention link, they Describe to set this validation in system there are some setting in web config ect....
Sudhir SharmaPosted Feb 4, 2013, 2:29 AM
Sure,
But at the time of editing it not works .
Thanks
Jignesh TrivediPosted Feb 1, 2013, 7:23 AM
We can easily add validation to our application by adding Data Annotations to our model classes.
Please refer
http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-6
http://www.codeproject.com/Articles/422573/Model-Validation-in-ASP-NET-MVC
Generally Annotations is good practice when we use ORM model.