D
D. Shane Fowlkes
This should be easy but I'm having a little trouble connecting the logical
dots. I have a function which simply returns the 12 month names. Whoopie.
I'm trying to store that data into an ArrayList and this arraylist is
created when a function is called. After calling the function, I'm trying
to bind this array to a DropDownList. All this up to this point seems to
work.
But what I'd LIKE to do is have the value of the DropDown list items be the
INDEX of the array instead of the literal month name. So instead of :
<option value="January">January</option>
I'd like:
<option value="1">January</option>
But I'm not quite sure how to bind the Index too. Any suggestions and more
importantly, any pointers on a better way of doing this?
Thanks!!
http://www.drumpub.com/months.aspx (sample and source code)
dots. I have a function which simply returns the 12 month names. Whoopie.
I'm trying to store that data into an ArrayList and this arraylist is
created when a function is called. After calling the function, I'm trying
to bind this array to a DropDownList. All this up to this point seems to
work.
But what I'd LIKE to do is have the value of the DropDown list items be the
INDEX of the array instead of the literal month name. So instead of :
<option value="January">January</option>
I'd like:
<option value="1">January</option>
But I'm not quite sure how to bind the Index too. Any suggestions and more
importantly, any pointers on a better way of doing this?
Thanks!!
http://www.drumpub.com/months.aspx (sample and source code)