Presentation Layer - get and pass the credentials to the Business Logic Layer
Business Logic Layer - validate the credentials (using either LDAP/ custom authentications from DB). After validation, you may decide to store the output to a session, which will be shared among all the pages.
Data Access Layer - use it to pull the respective credentials from DB (if you use your custom authentication)
A simple solution.
Website Project
1. Login.aspx.cs
public void btnLogin_click()
{
LoginControlClass logClass = new LoginControlClass();
logClass.IsAuthenticatedUser(userName, password);
}
BLL (Class Library)
public class LoginControlClass
{
public bool IsAuthenticatedUser(string userName, string password)
{
LoginDal loginDal = new LoginDal();
User user = loginDal.RetrieveUserCredentials(userName, password);
}
}
DAL (Class Library)
public class LoginDal
{
public User RetrieveUserCredentials()
{
}
}
Cheers
- Balaji