Hi,
When I insert the following code in my .aspx markup:
<%= Html.ListBox("FieldID", ViewData.Fields, ViewData.Fields.Count, true, "FieldName", "FieldValue", null, new { style="position: float" }) %>
then I get the following html rendered:
<select name="FieldID" id="FieldID" IsReadOnly="False" IsFixedSize="False" IsSynchronized="False" Keys="System.Collections.Hashtable+KeyCollection" Count="1" Values="System.Collections.Hashtable+ValueCollection" SyncRoot="System.Object" multiple size= 16>
Seems like the extension method takes all properties from the anonymous class that I specify as the attributes instead of only my style attribute that I defined.
Doesn't really make for nice looking client code, not to mention that too much is sent over the wire...
Robin