beginners dropdown question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the following to select an item in a dropdown at runtime.

If its a bad data and item doesn't exists in dropdown it errors out, is
there any other way to avoid this.

Thank you.

this.CTRY_CD1.Items.FindByValue(oDrSBAD1["CTRY_CD"].ToString().Trim()).Selected = true;
 
Back
Top