In updatepanel, when textbox exists in contentcomplate, Chinese characters are garbled.
There are two solutions:
1. Add in Web. config
<Globalization fileencoding = "UTF-8" requestencoding = "UTF-8" responseencoding = "UTF-8" Culture = "ZH-CN"/>
2. In the backgroundCodeDecoder operations with garbled characters
The above two are not good solutions. The first one may cause problems on other pages. The second one is correct even though it is stored in the database. However, what the user sees is still garbled, this seriously affects user experience. So where is the best solution?
Solution: add the <location> Configuration section to the Web. config file to configure the encoding for a specific file or directory, as shown below:
<Location Path = "here is the directory or file name">
<System. Web>
<Globalization fileencoding = "UTF-8" requestencoding = "UTF-8" responseencoding = "UTF-8" Culture = "ZH-CN"/>
</System. Web>
</Location>