日期:2014-05-18  浏览次数:20404 次

DropDownList问题````新手求助
我做一个搜索的自定义控件
要在DropDownList加两个选项(不需要进行数据绑定)
1.News
2.Product

然后news的value为1
product的value为2

请问应该怎么实现
谢谢``

------解决方案--------------------
在item属性中设置
------解决方案--------------------
<asp:DropDownList id= "DropDownList1 " runat= "server ">
<asp:ListItem Value= "1 "> news </asp:ListItem>
<asp:ListItem Value= "2 "> product </asp:ListItem>
</asp:DropDownList>