Two Bugs in HTML Select Element

I believe I have found 2 bugs in the Select HTML element. If you enter server-side of:

ddService.Items.Item(index).selected = true

ddService being the ID of the <select> element with a runat="server" attribute the code that is generated is

<option selected="selected" value="3233">Some option text

the proper structure is

<option selected value="3233">Some Option text

The same is true for the multiple attribute. the code that is generated is

multiple="multiple"

Microsoft's own documentation states that the proper values for selected and multiple are true/false.

Thanks,

PS: I would appreciate a fix for this before I am too old to enjoy it.



Answer this question

Two Bugs in HTML Select Element

  • scottsignalscape

    Since this deals with ASP.NET generated HTML this is really a question for http://forums.asp.net/. However, before demanding for a fix I would suggest reading the HTML4 standard (which lists multiple as the one and only value possible for the multiple attribute and same for the selected attribute), the XHTML standard (which does the same as HTML4) and reread the Microsoft documentation (true/false is about using those 2 properties in script, not in markup).


  • Two Bugs in HTML Select Element