Hi all, I just came across something odd.
I'm just building a simple form, like this in visual studio
<div class="control-group"> <label class="control-label" for="rent">Rent</label> <div class="controls"> <asp:RadioButton ID="rent" runat="server" GroupName="expenses" /> </div> </div>
and when I viewed it, I expected to be able to click on the label and get the corresponding radio button checked, but alas, that doesn't work. I know I can do that if I use a HTML radio button, but this time, for a change, I want to use a asp radio button. So, first things first: I checked and that label renders as a normal label in the HTML, so no problem there. I came across this interesting post http://laak.fi/2012/09/associated-form-elements-and-labels-in-asp-net-webforms/ which esentially says that I need to add a AssociatedControlID attribute to my label, whose value will be the id of the hradio box, like this
AssociatedControlID="rent" but no joy, nothing changes and in fact visual studio says: "validation XHTML5: this name contains upper characters which is not allowed". Eh? XHTML5? Who set that? my document type is HTML 5, not sure where that comes from, but anyway, point being I can't get that label and radio button to behave the way I want them to do. Does anybody have a clue?