How to Use a Session variable in the class files in c#

Hi Friends,

Here i'll explain you , how to use Session variable in .cs class using C# . because session variable is not directly use in the Class , so we have to use this statement,

System.Web.HttpContext.Current.Session["Session_variable"].ToString();

This Statement help to use Session variable in .cs Class.

Warm Regards,

Rajesh

0 comments: