Having just upgraded to the latest ASP.NET MVC Release Candidate I noticed that, when using Html Helpers, any name with a period ‘.’ in it will have this replaced by an underscore ‘_’ when the element’s ID is output.
I believe this is to aid in using JQuery and the use of the period is to aid in the use of ModelBinders. This has broken all of our javascript, which uses prototype, as the IDs have all changed.
Is there a way to turn this feature off easily?
From the ASP.NET MVC RC1 Release notes (page 15).
FYI. Looking at the source code at http://www.codeplex.com/aspnet, it appears that the real name of the property in RC1 is IdAttributeDotReplacement. The relevant code snippet is below. To keep the dot, you’d just set this property to the dot character — i.e., replace the dot character with itself.