Author: Yuppski | Posted on: 4/21/2010 7:46:40 AM | Views : 260

 Hi All
 
Im trying to stop a user from accessing a page directly in the address so I have a login
on the Default page and do a crude check.  
 
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { if (ValidUser(Login1.UserName, Login1.Password)) { Response.Redirect("Main_Menu.aspx"); } else { e.Authenticated = false; } } This is the check on the Main_Menu.aspx page:-  protected void Page_Load(object sender, EventArgs e) { if (!System.Web.HttpContext.Current.Request.IsAuthenticated) { Response.R ...

Go to the complete details ...