Is there any function in C# similer to escape() of javascript?????????????

bharat

Newcomer
Joined
Apr 8, 2003
Messages
1
Hi expert,
I am using c# on server side and javascript on client side. I want to use one string for which OI am using escape() function of javascript. Now I want to unescape it on server side with the help of c#.
So, is there any function similer to unescape() in c#. I know escape() and unescape() of c# which is present in System.Text.RegulerExpressions but the wey this function works is different then the way the javascript's function works. I mean encodeing and decodeing style.
Even I tried with server.URLDecode this function also uses some different encodeing style than the escape or unescape.
If there is no any similer function in C# then somewhere can I get the code of escape() function of javascript so that I can write my own escape() for c#.

Thanks
Bharat :confused:
 
Hi

http://msdn.microsoft.com/msdnmag/issues/04/07/WebQA/

"You probably shouldn't try to port it to C# in the first place. Why not just use JScript .NET? JScript .NET was specifically designed for your scenario—you've got a bunch of JScript code that has to be ported to ASP.NET. Why go through all the expense and difficulty of porting working code to a new language?

If you're set on porting it to C#, and you have determined that you meant to call escape (not UrlEncode, UriEncode, or any other encoding methods) then probably the easiest thing for you to do would be to call Microsoft.JScript.GlobalObject.escape."


bharat said:
Hi expert,
I am using c# on server side and javascript on client side. I want to use one string for which OI am using escape() function of javascript. Now I want to unescape it on server side with the help of c#.
So, is there any function similer to unescape() in c#. I know escape() and unescape() of c# which is present in System.Text.RegulerExpressions but the wey this function works is different then the way the javascript's function works. I mean encodeing and decodeing style.
Even I tried with server.URLDecode this function also uses some different encodeing style than the escape or unescape.
If there is no any similer function in C# then somewhere can I get the code of escape() function of javascript so that I can write my own escape() for c#.

Thanks
Bharat :confused:
 
Back
Top