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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top