JavaScript JSON Error While Tabbing in ASP.NET MVC
Posted
by MightyZot
on Geeks with Blogs
See other posts from Geeks with Blogs
or by MightyZot
Published on Mon, 11 Nov 2013 16:11:49 GMT
Indexed on
2013/11/12
3:57 UTC
Read the original article
Hit count: 497
Originally posted on: http://geekswithblogs.net/MightyZot/archive/2013/11/11/javascript-json-error-while-tabbing-in-asp.net-mvc.aspx
I sometimes don’t care about validation for a specific control. The RememberMe control in the login form, for example, really doesn’t need validation, so I forget to include the Html.ValidationMessageFor helper line for that control in particular. As a result, when I’m debugging using IE, I get a silly JSON parsing exception when changing focus from one field to another. The exception doesn’t hurt anything, as far as I know, but it’s just plain annoying. If you’re getting this error, and you don’t want validation messages showing up for controls on a form, you can put them in div tags and set the display style on the divs to none. When I have a handful of controls that I don’t want the validation messages for, I just throw them all in the same div and hide it.
© Geeks with Blogs or respective owner