Reputation:
i have only one item in dropdownlist, so the selected index changed event is not fired. can someone help me in this? Thanks
Upvotes: 0
Views: 1350
Reputation: 2199
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.
Upvotes: 1
Reputation: 620
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?
Upvotes: 1