Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set List Box Value

Status
Not open for further replies.

guitardave78

Programmer
Sep 5, 2001
1,294
GB
Hi all
I have an xml file that i want to put in a list box. It has a key and value attribute on each item
Code:
<items>
	<item value="360" key="XBOX 360"/>
	<item value="DS" key="Nintendo DS"/>
	<item value="GBA" key="Gameboy Advance"/>
</items>

I want a listbox that will display the key but will use the value when i select it

How!!! :D

}...the bane of my life!
 
Try this link:


It is for a DropDownList in ASP.NET, but there should be very little difference. The properties of the control are a little differently named and you will not have to use the Databind Method to bind the data to the control. It should hold a good guideline though.

Senior Software Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top