开发者

Fedup with Ajax Combobox in asp.net, how to stop it from exception if there is no value?

I am using开发者_运维知识库 Ajax auto-complete combobox in asp.net.

I fetch values from database and do like :

MyCombo.SelectedValue = rd["combovalue"].ToString();

For example - if there is 6 in table but not in combobox values, it gives an exception (this value does not exist in combobox). If there is some value in database but not in combo, it should select the 0 index of combo, instead of doing like this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜