A session usually refers to an action from the beginning to the end of an action.
For example "call", usually "1." Pick up the phone--2. Dial the other number--3. The other side--4. Hang up the machine. These four steps form a basic session from completion to the end, and any break in the middle will cause the session to fail.
In the browser, the session is mainly through the connection, "open shopping-click on the connection Select items-Add to the shopping cart-checkout" formed a session, without the use of cookies, any break in the middle of the session will fail.
All, you use the browser to open 2 pages, in a page to assign value, in another browser value, is not access. Values can be taken only in one browser via a connection (or by jumping to another page via code).
HttpContext.Current.Session and Session are mainly for browser users, all, basically no difference between the two, but not all programs are accessed through the browser.
For example, the user obtains the data through the EXE program, may fail.
In addition HttpContext.Current. is for the current user, and the session is for the web context.
For example, there are 2 pages: The Default.aspx code is as follows
protected void Page_Load (object sender, EventArgs e)
{
System.Threading.Thread threadHand1 = new System.Threading.Thread (() = { session["a"] = "a"; }); Threadhand1.start (); Response.Redirect ("default2.aspx");
}
And on another page get
protected void Page_Load (object sender, EventArgs e) { Response.Write (session["a"]); }
This is where you can get it.
And if the above code is modified to
protected void Page_Load (object sender, EventArgs e) { new System.Threading.Thread () = { httpcontext.current.session["a" "a" ; }); Threadhand1.start (); Response.Redirect ("default2.aspx"); }
The other page is modified to
protected void Page_Load (object sender, EventArgs e) { Response.Write (httpcontext.current.session["a"]); }
is not available.
Because default1.aspx in the System.Threading.Thread start the context is not default2.aspx in the context.
In short, unless you open the room exe, third-party component interface, etc., otherwise, basically 2 people basically no difference.
The difference between HttpContext.Current.Session and Session