下拉列表单项 [英] Dropdownlist Single item

查看:107
本文介绍了下拉列表单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如果在下拉列表中,它只有一个项目,而不是我想要选择的项目,那么为什么它无法选择和查看它.但是,如果它们存在多个项目,那么我可以选择所有项目.
请帮助
在此先谢谢您.

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.

推荐答案

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




虽然您选择或不选择如果只有一个项目,那么
DropDownList1.SelectedItem.Text为您提供该项目的文本(在此处选择).




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


这篇关于下拉列表单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆