Can i access ValidationMessage through jquery in asp.net mvc
Im trying to access ValidationMessage through jquery. I have <%: Html.TextBox("vcr_LinkAddress",null, new { maxlength = 255 })%> <%: Html.ValidationMessage("vcr_LinkAddress")%> and i want to 开发者_开发知识库validate textbox and if it is empty ill print a message in ValidationMessage
Please have a look at
http://stephenwalther.com/blog/archive/2008/09/10/asp-net-mvc-tip-43-use-data-annotation-validators.aspx
or
http://msdn.microsoft.com/en-us/library/dd410405.aspx
so you want to integrate client-side validation (with jQuery validation) with your existing server-side validation?
if your server-side validation is using the IRulesProvider Interface i suggest that you look into xVal http://xval.codeplex.com/
精彩评论