asp.net菜鸟问题:为什么选择中文选项,不会显示?
以下程序运行后,选择中文选项,提交后不会显示中文,请各位帮帮忙,指出错在哪里?
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>
<script runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
If Not IsPostBack Then
dropdownlist1.items.add("计算机1")
dropdownlist1.items.add("sdsdsd")
dropdownlist1.items.add("2")
dropdownlist1.selectedindex=0
End If
End Sub
sub btn_click(sender as object,e as eventargs)
dim strselectitem as string=Trim(Request.Form("dropdownlist1"))
response.Write("你选择的是")
response.Write(strselectitem)
end sub
</script>
<html >
<meta http-equiv="content-type" content="gb2312">
<head>
<title>无标题文档</title>
</head>
<body>
<form action="p4.12.aspx" method="post" name="form1" id="form1" runat="server">
<asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList>
<asp:Button runat="server" Text="提交" OnClick="btn_click" />
</form>
</body>
</html>
参考答案:没看出来什么问题