P.S。这是一个经典的问题,我已经回答了太多次,但似乎没有人在stackoverflow之前问过。
解决方案设置自动回覆属性为true将导致其在选择更改时进行回发。请注意,这需要启用javascript。
I'm writing an ASP.Net webform with some DropDownList controls on it. Then user changes selected item in one of dropdowns, ASP.Net doesn't seem to handle SelectedIndexChanged event until form is submitted with a 'Submit' button click. How do I make my dropdowns handle SelectedIndexChanged instantly?
P.S. It's a classic question I have answered too many times, but it seems no one asked it before on stackoverflow.
解决方案Setting the AutoPostback property to true will cause it to postback when the selection is changed. Please note that this requires javascript to be enabled.
更多推荐
DropDownList不会在SelectedIndexChanged上回发
发布评论