0

I was wondering how I can get data from the server side that is being passed to my page via encrypted url using java script? Let say I have this in visual basic in my code behind,

 lnkToAPage.NavigateUrl = RelativePagePaths.ThePage + "?"+ QueryStringModule.Encrypt("PageMode=" + pageMode ...

I need to extract a piece of that data, which I get from an object on the server, to do something with it on the client side using javascript. I understand I can get the data from the url like it says here

but the data in the url is encrypted so the data I get from there is useless, I can send it without the encryption but that exposes to much. So is there a way I can use ajax to retrieve that data or object, or maybe there's another way? Or is it not possible at all?

Community
  • 1
  • 1
Jack Thor
  • 1,554
  • 4
  • 24
  • 53

1 Answers1

0

I am not aware of what encryption protocol you are using, but if you get an encrypted version of your attributes, you need to decrypt it using the same protocol with javascript.

On the web, it is common practice (and a good one) to encrypt the connection using HTTPS. it protects anyone from seeing the parameters as explained here.

This does not seem to be an ajax related problem (from what I understood of the question).

Community
  • 1
  • 1
K-Yo
  • 1,250
  • 10
  • 14
  • That what I though, I only suggested Ajax in case there might be a solution involving ajax. I was trying to avoid having to decrypt the data since I am not sure how to do that but I guess there is not other way. – Jack Thor Aug 07 '13 at 22:23
  • It's the whole point of encryption. If it's encrypted, it is so nobody but the recipient(s) can read it... by decrypting it. – K-Yo Aug 07 '13 at 23:04