Click here to Skip to main content
15,915,702 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

if in dropdownlist it has only one item than if i want to select it then why it is not able to select and view it. But if their exist more than one item than i am able to select all items.
Plz Help
Thanks in advance.
Posted
Comments
Sandeep Mewara 11-Apr-11 9:14am    
Not clear. Can you please re-phrase and explain it again?

What you are saying is not clear and whatever I can make out from it - doesn't sound like a normal behaviour.
web works 11-Apr-11 9:47am    
Unable to understand your question? Sorry, Say it again.

1 solution

XML
<asp:DropDownList ID="DropDownList1" runat="server">
        <asp:ListItem>select</asp:ListItem>
        </asp:DropDownList>



Though you select or not if you have only a item then
DropDownList1.SelectedItem.Text gives you the that item text(select here).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900