using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
public partial class answer : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
if (Session["UserName"] != null)
{
lblLogin.Visible = true;
lblLogin.Text = "Hi, " + Session["UserName"].ToString();
lnkBtnSignOut.Visible = true;
HyperLink1.Visible = false;
}
if (Session["Clicked"] == "lnkBtnSignOut")
{
Session.Clear();
Response.Redirect("Default.aspx");
HyperLink1.Visible = true;
lblLogin.Visible = false;
lnkBtnSignOut.Visible = false;
lnkAdmin.Visible = false;
}
}
}