Q:

How to Encrypt and Decrypt the data and how to send in Querystring url

I have a web application in that in have two forms in this i have pass the Encrypted data with the Querystring.In second page i get the Querystring data and then i need to Decrypt the data & bind that data in my page ...  for this i have write the code in this Encrypt and Decrypt is working in one(same aspx) page ,but when i redirect the  page Decrypt is throwing Error like
             Invalid length for a Base-64 char array.

What can i do to resolve this Error Please help me..

A:

64-bit encoding does not work well with spaces in the string
Add the following: stringToDecrypt = stringToDecrypt.Replace(" ","+");
Plus sign will be interpreted as a space when u call the FromBase64String method

