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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 1, 2013, 2:23 AM EST
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.
Sudhir Sharma62 reputationPosted Feb 3, 2013, 9:29 PM EST
Sure,
But at the time of editing it not works .
Thanks
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 3, 2013, 10:38 PM EST
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 Sharma62 reputationPosted Feb 3, 2013, 11:42 PM EST
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 4, 2013, 1:41 AM EST
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.