读书人

DropDownList中绑定的数据怎么取

发布时间: 2011-12-25 23:21:20 作者: rapoo

DropDownList中绑定的数据怎样取?
前台
<asp:DropDownList ID= "ddl " runat= "server " OnSelectedIndexChanged= "DropDownList1_SelectedIndexChanged ">
<asp:ListItem> 1 </asp:ListItem>
<asp:ListItem> 2 </asp:ListItem>
<asp:ListItem> 3 </asp:ListItem>
</asp:DropDownList>
后台怎么写呢?参数e后面怎么点不出东西啊
不是应该会有.Item的吗?怎么我点不出来啊
FindControl拿不到数据了

[解决办法]
ddl.SelectValue
[解决办法]
ddl.SelectValue,或ddl.Text,ddl.SelectedItem.Text

读书人网 >asp.net

热点推荐