##Global.asax file ##
This is global.asax file for writing session variable
protected void Session_Start(object sender, EventArgs e){
Session["myName"] = "something";
}
The class below is located in a separate library but in the same solution
--------------------------------------------
## MyClass.cs ##
using system.web;
public class myclass{
public string my method()
{
string x = httpcontext.current.Session["myName"];
return x;
}
}
but here the session value is null. I am unable to populate the string.
Please let me know what I am doing wrong.