开发者

“OnClick” action to asp.net dropdownlist item

My situation is a little strange I guess, suggestion of engineering is acceptable.

I have a DropDownList, on my "user" creation, called "city". When I'm creating the user I can create other city, but for this I have a button which redirect to other page.

So, ok. I've created the new City and now I click on my Dro开发者_如何学运维pDownList of cities and guess what?! The field is not reloaded.

My first idea is every that I click on DropDownList, reload the data, but I can't find some OnClick action for Asp.Net DropDownList.

This is my question, some idea? Thanks in advance.


I believe you are looking for the AutoPostBack option. Set it to true and your page will automatically reload when the list is changed.


This is what you have to do. After the user creates the new city in the other page. Make sure that you refresh the parent page. This will bring the new city value.

HTH

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜