UrlEncode through a console application?

后端 未结 12 1247
我寻月下人不归
我寻月下人不归 2020-12-15 02:16

Normally I would just use:

HttpContext.Current.Server.UrlEncode(\"url\");

But since this is a console application, HttpContext.Curren

12条回答
  •  死守一世寂寞
    2020-12-15 03:07

    Best thing is to Add Reference to System.web..dll

    and use var EncodedUrl=System.Web.HttpUtility.UrlEncode("URL_TEXT");

    You can find the File at System.web.dll

提交回复
热议问题