读书人

请教如何读取下拉菜单dropdownlist的值

发布时间: 2012-01-18 00:23:26 作者: rapoo

请问怎么读取下拉菜单dropdownlist的值呢 在线等!! VB的
做了个网站 用下拉添加的时间 可是要修改的话读出来的不是数据库的 要怎么读才能叫值显示在上面 而不是默认的第一个值
麻烦写清楚点谢谢

[解决办法]
DropDownStyle属性设为DropDown
[解决办法]
<script>
var i = 0;
</script>
<form id= "Form1 " method= "post " runat= "server ">
<asp:DropDownList id= "DropDownList1 " runat= "server ">
<asp:ListItem Value= "aaaaa "> aaaaa </asp:ListItem>
<asp:ListItem Value= "bbbb "> bbb </asp:ListItem>
</asp:DropDownList>
<input type= "button " value= "添加 " onclick= "DropDownList1.options[DropDownList1.options.length] = new Option(++i,i,true,true) ">
<asp:Button id= "Button1 " runat= "server " Text= "Button "> </asp:Button>
</form>


Response.Write(Request.Form(DropDownList1.UniqueID))

读书人网 >VB Dotnet

热点推荐