Why is System.Web.HttpUtility.UrlEncode giving namespace name doesn't exist in Visual C# 2008?

前端 未结 4 1305

I\'m trying to encode a URL using the HttpUtility.UrlEncode() method, why am I getting

The type or namespace name \'HttpUtility\' does not e

4条回答
  •  醉梦人生
    2021-02-02 11:18

    For people using .NET 4.0 or later, you can use WebUtility.UrlEncode which works with client profile (does not require System.Web assembly reference).

提交回复
热议问题