Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I want to redirect to some page with querystring,and the querystring value should be in encrypted format and i want to decrypt that in codebehind

example:
JavaScript
function redirect(s, e)
{
   window.location.href = "Default2.aspx?Id=" + encrypt(5)+ "&No=" +encrypt( 5);
}


and in codebehind:

Dim id As String = Request.QueryString("Id").ToString()
        id = Decode(id)
Dim no As String = Request.QueryString("No").ToString()
        no= Decode(no)


Thanks in Advance

Arasu Rajendran
Posted
Updated 23-Feb-12 5:06am
v2
Comments
[no name] 23-Feb-12 11:06am    
Format code snippets when posting

Hi there..

.NET supports most common encryption algorithms natively and allows you to add support for more, so all that really matters is what you can do in JavaScript.

try this link
http://www.vincentcheung.ca/jsencryption/[^]
 
Share this answer
 
There really is no point in trying to encrypt anything in the JavaScript. Remember this code would be run in the client browser and the user would have full access to it making it very, very easy to spoof.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900