Home > Web Front-end > JS Tutorial > Implementation code for calling Session using JQuery_jquery

Implementation code for calling Session using JQuery_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 18:17:35
Original
1033 people have browsed it

Very simple, look at the code, value is the value of session

Copy the code The code is as follows:

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
Copy code The code is as follows:

string sessionName = "";
protected void Page_Load(object sender, EventArgs e)
{
sessionName = Request.Form["s"].ToString();
Response.Write(Session[ sessionName]);
Response.End();
}
Related labels:
source:php.cn
Statement of this Website
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
Latest Issues
Session
From 1970-01-01 08:00:00
0
0
0
session
From 1970-01-01 08:00:00
0
0
0
session login information
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template