PDA

Click to See Complete Forum and Search --> : Selecting a Listbox item


dmountcastle
Aug 19th, 2002, 09:19 AM
I am trying to programatically select an item from a listbox on a .net webform. After populating the list in the page load, I want to tell the listbox to select a value from its list as if the user had done so. Can this be done.

pacman429
Aug 28th, 2002, 01:09 PM
set the selectedIndex property of the listbox control to the index desired. This will highlight the item as if the user clicked on it.