30 lines
768 B
C#
30 lines
768 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
public partial class base_page : System.Web.UI.MasterPage
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if(Session["username"] == null)
|
|
{
|
|
Response.Redirect("login.aspx");
|
|
return;
|
|
}
|
|
|
|
username_literal.Text = Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(Session["username"].ToString());
|
|
time_label.InnerText = DateTime.Now.ToLongDateString();
|
|
}
|
|
|
|
|
|
protected void onCerrarSesionClick(object sender, EventArgs e)
|
|
{
|
|
Session["username"] = null;
|
|
Response.Redirect("login.aspx");
|
|
}
|
|
}
|