public partial class Home : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.NoCache); if (!IsPostBack) { Label1.Text = (string)Session["username"]; } } protected void Button1_Click(object sender, EventArgs e) { Session.Abandon(); Session.Remove("username"); FormsAuthentication.SignOut(); Response.Redirect("Default.aspx"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)