1. Global configuration
<system.web>
<globalization fileencoding= "Utf-8" requestencoding= "Utf-8" responseencoding= "Utf-8"/>
<!--in order: File encoding request encoding response code--
<!—-fileencoding will talk about it in the back--
<!--There are other configurations--
2. Page-level configuration
To set the response encoding in the page directive of the ASPX page
<%@ page language= "C #" autoeventwireup= "true" responseencoding= "Utf-8"
Codebehind= "Byte.aspx.cs" inherits= "Devkit.web.test.charset._byte"%>
Manually specify META tags in the ASPX page
<meta http-equiv= "Content-type" content= "Text/html;charset=utf-8"/>
Configuring in the background CS file
request.contentencoding = System.Text.Encoding.UTF8; Request encoding
response.contentencoding = System.Text.Encoding.UTF8; Response encoding Next, we will experience garbled characters from a few examples to summarize the general method of solving garbled characters.
Asp. NET in the request response encoding settings