UrlEncode

是将指定的字符串按URL编码规则,包括转义字符进行编码。

UrlEncode  和 HtmlEncode

1 void Main()
2 {
3     string rawUrl = "http://www.demo.com?key=测试";
4     string urlEncode = System.Web.HttpUtility.UrlEncode(rawUrl);
5     urlEncode.Dump();
6 }
View Code

相关文章:

  • 2021-09-18
  • 2021-07-29
  • 2022-12-23
  • 2021-12-22
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-08-08
猜你喜欢
  • 2021-12-08
  • 2021-07-19
  • 2021-12-13
  • 2022-03-07
  • 2022-01-23
  • 2021-12-13
相关资源
相似解决方案