HTML:这里一定要用name="s1",否则后台会不识别,不需要用runat="server"
<select name="s1" id="s1" ><option selected="selected">国家</option></select>
VB:
usr.usercountry = Request.Form("s1")
同理,input 等HTML控件也可以.
本文介绍如何在HTML中正确设置表单控件的名称属性以便VB后台能够正确接收数据。特别强调了<select>元素的使用,并提供了一个具体的例子说明如何将用户的选择传递给服务器端。
HTML:这里一定要用name="s1",否则后台会不识别,不需要用runat="server"
<select name="s1" id="s1" ><option selected="selected">国家</option></select>
VB:
usr.usercountry = Request.Form("s1")
同理,input 等HTML控件也可以.

被折叠的 条评论
为什么被折叠?