更新时间:2022-05-30 07:42:25
使用URL编码和解码
在c#中使用如下:
string url = HttpUtility.UrlEncode( http://www.abc.com/a?q=b);
use URL Encoding and decoding
In c# use as follow:
string url = HttpUtility.UrlEncode("http://www.abc.com/a?q=b");
使用 Server.UrlEncode ,
use Server.UrlEncode,
here it is an example...
Dim MyURL As String
MyURL = "http://www.contoso.com/articles.aspx?title=" & Server.UrlEncode("ASP.NET Examples")
Response.Write( "<a href=" & MyURL & "> ASP.NET Examples </a>")
快乐编码!
:)
Happy Coding!
:)