参照web.config的设置
To specify encoding
To set the encoding for all pages, add a Globalization property to the
Web.config file, and then set its fileEncoding, requestEncoding, and
responseEncoding attributes, as shown in the following example:
Copy Code
<configuration>
<system.web>
<globalization
fileEncoding="utf-8"
requestEncoding="utf-8"
responseEncoding="utf-8"
culture="en-US"
uiCulture="de-DE"
/>
</system.web>
</configuration>
To set the encoding for an individual page, set the RequestEncoding
and ResponseEncoding attributes of the @ Page directive, as shown in
the following example:
Copy Code
<%@ Page RequestEncoding="utf-8" ResponseEncoding="utf-8" %>
detail infomation:
http://msdn.microsoft.com/en-us/library/39d1w2xf.aspx