2

I want to get the session value inside the global.asax files, is it possible, if yes how please ?

Adham
  • 63,550
  • 98
  • 229
  • 344

1 Answers1

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