Hi,
I have a ListItemCollection which contains data like below:
System.Web.UI.WebControls.ListItemCollection licListItems = new
System.Web.UI.WebControls.ListItemCollection ();
licListItems.Add (new ListItem ("One", "1"));
licListItems.Add (new ListItem ("Two", "2"));
licListItems.Add (new ListItem ("Three", "3"));
return licListItems;
But when I bind this ListItemCollection into a DropDownList,
the DropDownList generated HTML code like below:
<select>
<option value="One">One
<option value="Two">Two
<option value="Three">Three
</select>
Instead of
<select>
<option value="1">One
<option value="2">Two
<option value="3">Three
</select>
Can anybody help?
Thanks & Regards,
James
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.516 / Virus Database: 313 - Release Date: 9/1/2003