I was working on a project and a requirment To use the value of a session variable in the class files using c# with ASP.Net use the following statement
direct use of Session collection is not allowed in the .cs files so to achieve the purpose we have to follow the whole path i.e
System.Web.HttpContext.Current.Session["varname"].ToString()
Example:
[code]
System.Web.HttpContext.Current.Session["con1"].ToString()
[/code]
++
Thanks and Regards
Meetu Choudhary
| < Prev | Next > |
|---|

Thanks Meetu, Its really a great and...
Good one
massive formating
Well described
Really nice but I do not like the for...