0

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

1
  • 1
    What are you trying to achieve with one item in the list? Commented Nov 9, 2009 at 3:33

2 Answers 2

1

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?

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.