Manu Manu - 1 year ago 103
ASP.NET (C#) Question

Server.UrlEncode vs. HttpUtility.UrlEncode

Is there a difference between Server.UrlEncode and HttpUtility.UrlEncode?

Answer Source

HttpServerUtility.UrlEncode will use HttpUtility.UrlEncode internally. There is no specific difference. The reason for existence of Server.UrlEncode is compatibility with classic ASP.