在MSDN(http://msdn.microsoft.com/library/en-us/vbcon/html/vbtskselectingencodingforwebformsglobalization.asp?frame=true)上有这样一段说明:
In HTML view, add the encoding values to the page directive.
<%@ Page ResponseEncoding="utf-8" RequestEncoding="utf-8"%>
Note
You can use the Page directive to specify any attribute except for fileEncoding, because it applies to the file itself. You can use the globalization section of the Web.config file to specify any attribute, including fileEncoding.
这段话说,Page对象可以使用除fileEncoding之处的所有属性,在web.Config的globalization节中可以支持包括fileEncoding在内的所有属性
=======================================================================
MSDN写错了。
我查了sdk文档,也没有发现有支持RequestEncoding属性。
In HTML view, add the encoding values to the page directive.
<%@ Page ResponseEncoding="utf-8" RequestEncoding="utf-8"%>
Note
You can use the Page directive to specify any attribute except for fileEncoding, because it applies to the file itself. You can use the globalization section of the Web.config file to specify any attribute, including fileEncoding.
这段话说,Page对象可以使用除fileEncoding之处的所有属性,在web.Config的globalization节中可以支持包括fileEncoding在内的所有属性
=======================================================================
MSDN写错了。
我查了sdk文档,也没有发现有支持RequestEncoding属性。
解决方案 »
- .net MVC的登录实例
- 在asp中知道ip怎么得到该机的名字
- xml新手,求教.net下取节点问题
- 问个不是很理解的问题.
- 各位大侠进来看看这段代码哪里错了,谢谢!
- ASP.NET中客户端验证控件javascript方法中设置错误信息
- label里没正确显示含有html标签的文本,怎么改啊?
- 紧急求助!!分不够再加!
- 如何将一集合、数组赋值给DropDownList、DataGrid 之类的对象?
- 我在显示论坛文章时,原文章使用datareader,回复使用dataset,回复后原文章不能显示!!!
- toolbar控件中的有多个toolbarbutton控件时,如何控制其中某个控钮点击引发某个事件?
- 个人网站能否做在线支付?
<%//@ Page Language="C#" %>
<form action="1.aspx" method="post" runat="server">
选择:
<asp:dropdownlist ID="mylist" runat="server">
<asp:listitem value=0>唐工fff</asp:listitem>
<asp:listitem value=1>白同志</asp:listitem>
<asp:listitem value=2>秋叶</asp:listitem>
</asp:dropdownlist>
<asp:button ID="myb" runat="server" Text="点击" OnClick="MyClick" />
<asp:label ID="myLable" runat="server" />
</form>
<script language="C#" runat=server>
void MyClick(Object sender, EventArgs e)
{
myLable.Text = "您好,您选择了:" + mylist.SelectedItem;
}
</script>
这句是Dreamweaver MX自动产生