Click here to Skip to main content
15,908,015 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi all,
I have a listbox control the values are load in that at the time of pageload.
in that list box i want to highlight the first value at pageload. different data will be load at each time. how can i do that . and i dont know how to get indexvalue
Posted

1 solution

use listBox1.SelectedIndex = 0 after doing DataBind()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900