开发者

asp.net dropdown list control - dropdown list selected index change event not fired

i have only one 开发者_StackOverflow社区item in dropdownlist, so the selected index changed event is not fired. can someone help me in this? Thanks


not sure what you are trying to accomplish, but if you want to only have the one option in the select list, but still want the selected index changed even to be triggered, a cheat could be to add a generic default value like "Select One" or something?


Not sure of you situation, but you may want to consider adding a "Select One" option

<asp:ListItem value="" text="Select One"/>
<asp:ListItem value="123" text="Item124"/>

Then add some back-end logic to make sure selected index is >0 to make sure your item is selected.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜