Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 11, 2011 08:27 PM by DriesM
Jun 11, 2011 07:56 PM|LINK
Well something strange is happening when using a select list(<select>) in mvc 3 . For starters, i'm just using an MVC form with some labels and textboxes (labelFor and TextBoxFor) a model. On those properties I'm using dataannotations to client side validate
Source File: http://myserver.homeip.net:5043/Assets/Scripts/Core/jquery.validate.min.js
code fails, even a simple alert('test') event. When I remove the <select> tag everything just works fine again. Also I'm not trying to validate the select tag it's just euh a <select> tag.
Is this a bug or am I missing something concerning the use of dropdownlists in MVC 3?
Jun 11, 2011 08:27 PM|LINK
It seems that the jquery release 1.4.4.min.js generated the error when using a select tag in MVC 3. I changed the version of jquery to 1.6.1 and the problem was solved. It may seem obvious, but until now when you create a new mvc 3 project, microsoft automatically
refers to jquery 1.4.4. But apparently that files breaks on select tags.
Maybe its not a bug and I'm of track, but
nevertheless 1.6.1 did not fail on select tags, so when you encounter this
change the jquery version to the latest.