Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
+ 符号在从文本框中存储在数据库中时被编码为 %2b。我只想将它存储为+。那么如何实现呢?谢谢您的帮助。
您的值正在被 URL 编码。要解码,请尝试:
var decoded = HttpUtility.UrlDecode(input);
您可以使用
Server.HtmlDecode(Textbox.Text)
保存。
采用:
string value = Server.HtmlDecode(TextBox1.Text);