On Jun 9, 10:16*pm, Paul <P...@discussions.microsoft.comwrote:
I think that is what I was looking for, thanks.
--
Paul G
Software engineer.
"Alexey Smirnov" wrote:
On Jun 9, 8:27 pm, Paul <P...@discussions.microsoft.comwrote:
probably an easy way to do this but in the code behind I could not seehow to
get the first and last data value field of a dropdown listbox. *I have the
data value field being populated with a table ID and the data text field
being populated by a table field name. *I also have an objectdatasource that
is bound to the dropdown box so there is probably a way to get the
information from the objdatasource as well.
Thanks Paul.
--
Paul G
Software engineer.
Hi Paul
I think, you can use Items collection
DropDownList1.Items[0].Value
DropDownList1.Items[DropDownList1.Items.Count].Value
Hope this helps- Hide quoted text -
- Show quoted text -
Sorry, I think I did a mistake, collection index is a zero-based and
you need to use
DropDownList1.Items[DropDownList1.Items.Count-1].Value
to get the last item in the list.
Note, you would need to check the size of the Items collection....
If DropDownList1.Items.Count>0 Then
.....
Alexey