Adding "Attributres" to ListBox

  • Thread starter Thread starter Jim Douglas
  • Start date Start date
J

Jim Douglas

I don't know if I can do this or not. I want to add the Date1, Date2, Date3
attributes to the select option. Any help is appreciated!

<select id="txtProject">
<option Date1="01/01/2003" Date2="01/05/2003" Date3="01/06/2003">AR
Balance</option>
</select>

Thanks!
 
That's not really a .Net question (more of an HTML one), but to the best of
my knowledge, adding those fields has no meaning as it is not part of HTML.
If you want to add attributes to something, you have to have the ability to
extend the object model it represents, and you can't extend DOM in a way a
browser would understand. Only option I can think of (and it's a bit
difficult, as I don' tquite understand what you want the thing to do) is to
use ASP.Net's markup and add the attributes to a ComboBoxItem subclass (not
sure if I am using the right class name...haven't done combos in ASP)
 
Back
Top