I am using this encoding/decoding javascript 64bit from here http://www.webtoolkit.info/javascript-base64.html
so here is the scanrio: from JavaScript i am redireting to a new aspx page and on the page_load i am reading the QueryString id.
Everything working fine but the question is, if i want to encode/decode in asp.net in codebehind how would i do?
i am planning to encode before i redirect to a page from .JS but how would i read the encoded in asp.net code behind?
use below methods in code behind to encode and decode.
you can call
DecodeFrom64method to decode encoded text using JS.Test :
DecodeFrom64("QWJ1IEhhbXphaA==")result is"Abu Hamzah"andEncodeTo64("Abu Hamzah")result is"QWJ1IEhhbXphaA=="as expected.Edit:
Add base64 encode decode java script
you can download it from here http://www.webtoolkit.info/djs/webtoolkit.base64.js
in your javascript you can call this method as below
if you want to decode this query string parameter from server side, then you can use
DecodeFrom64method