开发者

How to dynamically add value in combo box using c sharp?

开发者_如何学编程

Hi I want to allow user to add new country names in combo box if his/her desired country is not listed in combo box. so next time this value should be add in combo box as well. I want to do this using c sharp. Kindly guide me.


Assuming you mean winforms:
These will only be available locally. On a Button-Click, save the data to one of these:

  • Textfile
  • XML-file
  • SQLCE Database

You should find more than enough tutorials with a your-favorite-search-engine-search like "c# save and read data to X"
When you read the data again, simply add it to your combobox using combobox.items.add("country"); oor use the DataSource-property.

Assuming you mean ASP.net:
Save them to your database.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜