Home > Code > C# > Accessing Session variable in Business logic layer in .NET

Accessing Session variable in Business logic layer in .NET

by Spidy   on Mar 09, 2011   Category: C#   |  Views: 4138    |  Points: 25   |  Silver 



Below sample code used to get the user id from business logic layer

Store the userid in the Presentation layer

Session["LoginID"] = “testuser”;


Get the userid from Business logic layer

using System.Web.SessionState;
string strUserID = (String)System.Web.HttpContext.Current.Session["LoginID"];





Post Code  |  Code Snippet Home

User Responses


No response found, be the first to review this code snippet.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts