Using Global.asax to Check if User is Logged in each page lo
Using Global.asax to Check if User is Logged in each page load
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaganathan BantheswaranPosted Jul 15, 2014, 3:43 AM
Web.config:
Base page:
public class BasePage : System.Web.UI.Page
{
public user secure_username
{get;set;}
protected void Page_Load(object sender, EventArgs e)
{
//add your checks that repeat on each page
}
}
Other pages:
public class AuthenticatedUsersPage : BasePage
{
}
For more info: http://www.asp.net/web-forms/tutorials/security/membership/user-based-authorization-cs