简体   繁体   English

相当于AtlEscapeUrl的C#

[英]C# equivalent of AtlEscapeUrl

我希望模仿这对ATL函数的行为:AtlEscapeUrl / AtlUnescapeUrl。

I expect you are looking for HttpServerUtility.UrlEncode and HttpServerUtility.UrlDecode . 我希望您正在寻找HttpServerUtility.UrlEncodeHttpServerUtility.UrlDecode

Normally accessed via a property of the current controller/page but also available as HttpContext.Current.Server.UrlEncode . 通常通过当前控制器/页面的属性访问,但也可以通过HttpContext.Current.Server.UrlEncode

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM