asp:DropDownList取值问题,3Q各位 asp:DropDownList取值问题:比如asp:DropDownList里有10行数据,用户选择了第三行,我如何获取该行的值??c#代码如何写?3Q各位 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 SelectedIndex SelectedItem SelectedValue SelectedIndex //选择的索引 SelectedItem //选择的项 SelectedValue //选择的值SelectedText //选择的显示的文本 string _value = DropDownList1.SelectValue; //获取选中行的值 string DDLValue=DropDownList.SelectedValue;//选中的值string DDLText=DropDownList.SelectedItem.Text;//选中的文本 SelectedIndex //选择的索引SelectedItem //选择的项SelectedValue //选择的值这些东西太基础了 你先把ddl和数据库绑定。。记得有一个SelectedIndex 还有个SelectedValue到时候就可以选取获得了 麻烦回去试试,不行就别说太基础.DropDownList1.Item[DropDownList1.SelectedIndex].ToString(); C#同一个页面内的传值问题 <system.web>分成两个节点写,和写在一个节点里有什么区别 我的.net编辑器怎么一从word中复制粘贴过来就不好使呢, 首页内容怎么实现全部更换? ajax初学者的疑问… 收到(上海.net 软件快速开发动手实验室(8/12 周三),费用已付,请立即报名确认)的邮件 一个简单的问题 robots.txt写法 新手安装vs.net 错误1308 数据库怎么添加image字段(sql2000) iframe求救 自定义复杂类型转换器(TypeConverter)错误,请大家帮忙看看
SelectedItem
SelectedValue
SelectedItem //选择的项
SelectedValue //选择的值
SelectedText //选择的显示的文本
string _value = DropDownList1.SelectValue; //获取选中行的值
string DDLValue=DropDownList.SelectedValue;//选中的值
string DDLText=DropDownList.SelectedItem.Text;//选中的文本
SelectedItem //选择的项
SelectedValue //选择的值这些东西太基础了
到时候就可以选取获得了
DropDownList1.Item[DropDownList1.SelectedIndex].ToString();