I want to get the session
value inside the global.asax
files, is it possible, if yes how please ?
Asked
Active
Viewed 5,343 times
2

Adham
- 63,550
- 98
- 229
- 344
-
1It depends: *when* do you want to access it? On Application_Start, there is no session yet. – Hans Kesting Mar 26 '13 at 08:11
-
Please review this, may this will help you http://stackoverflow.com/questions/1164503/asp-net-access-session-variable-in-global-asax – Vijay Singh Rana Mar 26 '13 at 08:08
1 Answers
2
just try this
if (HttpContext.Current != null &&
HttpContext.Current.Session != null) {
var data= HttpContext.Current.Session["sessionvariablename"];
}
Also check this : How to access session variable in global.asax file

Pranay Rana
- 175,020
- 35
- 237
- 263