8 Eylül 2010 Çarşamba

C#: Equivalent of JavaScript escape function

Uri.EscapeDataString("KC's trick /Hello") gives:
"KC's%20trick%20%2FHello"
Uri.EscapeUriString("KC's trick /Hello") gives:
"KC's%20trick%20/Hello"
System.Web.HttpUtility.UrlEncode("KC's trick /Hello") gives:
"KC's+trick+%2fHello"
System.Web.HttpUtility.UrlPathEncode("KC's trick /Hello") gives:
"KC's%20trick%20/Hello"

 

reference :http://kseesharp.blogspot.com/2008/01/c-equivalent-of-javascript-escape.html

Hiç yorum yok:

Yorum Gönderme