11 February 2014

Accessing Session variable in Business logic layer in .NET

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"];

No comments:

Post a Comment