Rectangle 27 3

This is a bug in MVC3 that we are planning on fixing for the next release (MVC 3 RTM). LabelFor will go through the tagbuilder to generate the 'for' attribute using the same logic that is used to generate ids so they will line up for arrays and nested types.

We are currently using the html 4.01 spec to generate ids so you cannot use ids that begin with non-letters. We will think about what the best approach should be now that the standards have changed.

Glad to find this is on the list of things to fix. I just spent half an hour googling this without a whole lot of success. Very frustrating.

asp.net mvc - LabelFor and TextBoxFor don't generate the same id's - S...

asp.net-mvc asp.net-mvc-2 html-helper