Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

This is my Model property

 public ModelStateDictionary modelSateClientSide { get; set; }

Now I called the Property In JavaScript and add the error in my modelstate

if(parseInt(academicAchievement, 10) > parseInt(peAcademicAchievement, 10))
                {
                    @Model.modelSateClientSide.AddModelError(string.Empty, "xxx");
                    return false;
                }

Am going to correct ?? And I got a error in above line

The best overloaded method match for

'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments

How can solve this ?? or Any other option for add error message in ModelState on MVC using Javascript ??

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.