Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

escape in c#

	string testString = "VGVzdDEgLSA6Ojo7OzsnJ34hQCMkJV4mKigpXytgLT1bXXt9Iid8XDw+LC4/Ly50eHQ=";
		testString = "Test1 - :::;;;''~!@#$%^&*()_+`-=[]{}"'|<>,.?/.txt"; // Test1 - :::;;;''~!@#$%^&*()_+`-=[]{}"'|<>,.?/.txt
		Console.WriteLine("UrlEncode: " + System.Web.HttpUtility.UrlEncode(testString));
		Console.WriteLine("EscapeUriString: " + Uri.EscapeUriString(testString));
		Console.WriteLine("EscapeDataString: " + Uri.EscapeDataString(testString));
		Console.WriteLine("EscapeDataReplace: " + Uri.EscapeDataString(testString).Replace("%20", "+"));	
		Console.WriteLine("HtmlEncode: " + System.Web.HttpUtility.HtmlEncode(testString));
		Console.WriteLine("UrlPathEncode: " + System.Web.HttpUtility.UrlPathEncode(testString));
https://dotnetfiddle.net/oLFyZq
 
PREVIOUS NEXT
Tagged: #escape
ADD COMMENT
Topic
Name
8+1 =