How do I encode an URL?

后端 未结 4 1072
猫巷女王i
猫巷女王i 2020-12-31 11:00

When I run my project I get the url http://localhost:5973/PageToPageValuePass/Default.aspx I want to Encode the URL since sometimes I need to transfer data fro

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-31 11:47

    try this

    • in ASP.NET
        Server.UrlEncode("http://www.google.com/c#");
    • in WinForms using System.Web.dll

      HttpUtility.UrlEncode("http://www.google.com/c#");

提交回复
热议问题