Dropdownlist

Reply

Join Date: Jun 2009
Posts: 452
Reputation: Ramesh S will become famous soon enough Ramesh S will become famous soon enough 
Solved Threads: 82
Ramesh S Ramesh S is offline Offline
Posting Pro in Training

Re: Dropdownlist

 
0
  #11
Jul 4th, 2009
You can handle this error

  1. drpcompname.SelectedValue = drd.GetValue(0).ToString();

Replace the above statement with the following code

  1. ListItem item = drpcompname.Items.FindByValue(drd.GetValue(0).ToString());
  2. if (item != null)
  3. item.Selected = true;
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 526 | Replies: 10
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC