Code Behind Page Page /Logout.aspx.cs (C#)
Used by Page /Logout.aspx (C#)
1: using System;  
2: using System.Web.Security;  
3:   
4: public partial class Logout : QuiznetOnline.Web.UI.BusinessClasses.BasePage  
5: {  
6:     protected override void Page_Load(object sender, EventArgs e)  
7:     {  
8:         base.Page_Load(sender, e);  
9:         // This kills the cookie  
10:         if (Request.Cookies["QuiznetOnlineCookie"] != null)  
11:         {  
12:             Response.Cookies["QuiznetOnlineCookie"].Expires = DateTime.Now.AddYears(-30);  
13:         }  
14:   
15:         FormsAuthentication.SignOut();  
16:         // This redirects them to the login page  
17:         Session.Abandon();  
18:         Response.Clear();  
19:         Response.Redirect("Default.aspx");  
20:   
21:     }  
22: }  

.NET Documentation Tool is © 2002 - 2009 Winnersh Triangle Web Solutions Limited.