You probably need to set up an HTTP handler or something similar that will accept requests and store things in the session. Visual studio has this somewhere in the Add menu in the solution view. (If you are using ASP.NET MVC, you are simply setting up a different action instead of a generic handler.)
Since these values ββcan be of different types (int, string, etc.), and since you do not want malicious users to tinker with any session key, they deem it necessary, you probably want to configure the branch to determine what to do with each key. Something like this (inside the handler you created):
string key = context.Request.QueryString["key"].ToString(); string val = context.Request.QueryString["val"].ToString(); if(key == "AshDiffuserID"){ int ash_diffuser_id = Convert.ToInt32(val); Session["AshDiffuserID"] = ash_diffuser_id; } else if(key == "PesterchumHandle") { string handle = val; Session["PesterchumHandle"] = handle; } else
After that, you will need to configure the post HTTP request through jquery, which places any values ββthat you need in these "keys" and the "val" field.
$.post( 'url/to/your/handler.ashx', {key: "PesterchumHandle", val: "carcinoGenetecist"} );
Jesse millikan
source share