Very simple, look at the code, value is the value of session
function GetSession(value) {
var temp;
jQuery.ajax({
type: "POST",
url: "GetSession.aspx",
async: false, //whether ajax Synchronize
data: "s=" value,
success: function(msg) {
temp = msg;
}
});
return temp;
}
GetSession.aspx page
string sessionName = "";
protected void Page_Load(object sender, EventArgs e)
{
sessionName = Request.Form["s"].ToString();
Response.Write(Session[ sessionName]);
Response.End();
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn