I need to pass a javascript data to the server-side on post-back.
Ex
var jsVariableToPass = new Object();
jsVariableToPass ['key1'] = value1;
jsVariableToPass ['key2'] = value2;
jsVariableToPass ['key3'] = value3;
I'd like this to be accessible as a Hashtable on the server side. What would be the best way of doing this?
The only posts I've seen do this use a hidden input. This seems a little hacky to me and I was wondering if there was another more acceptable way of doing this. Also, if this is the only way, what would be the best way to deserialize and serialize this?