Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Nichole Knight   on Jul 02 In Asp.net Category.

  
Question Answered By: Umaiza Hashmi   on Jul 02

I dont know whether this is good or not but I prefer
myList.SelectedIndex=myList.Items.IndexOf(myList.Items.FindByValue(value))
because this way some times even if the value is null(retreived from the
database, or the session expired) this will still work. But if you do the way
Steve mentioned you need to catch a null reference exception. So its up to you
how you want to use it.

Share: 

 

This Question has 8 more answer(s). View Complete Question Thread

 


Tagged: