Url Encoder Url Decoder
More Tools
Other tools: Base64 Decode | Base64 Image Decoder | Base64 Encode | Base64 Image Encoder

C# UrlEncode()

UrlEncode - encodes a string and returns the encoded string.

Function

public string UrlEncode( string s )

Parameters

s - The text to URL - encode.

Return value

Type: System.String - The encoded text.

Example
String UrlString = "url encode";
String EncodedString = Server.UrlEncode( UrlString );
Response.Write( "http://example.com/?param=" + EncodedString );
Output
http://example.com/?param=url+encode
See also:
C# UrlDecode