URL Encoding using C#

前端 未结 13 2099
北荒
北荒 2020-11-22 08:05

I have an application which sends a POST request to the VB forum software and logs someone in (without setting cookies or anything).

Once the user is logged in I cre

13条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 08:48

    Url Encoding is easy in .NET. Use:

    System.Web.HttpUtility.UrlEncode(string url)
    

    If that'll be decoded to get the folder name, you'll still need to exclude characters that can't be used in folder names (*, ?, /, etc.)

提交回复
热议问题