Initial Commit
This commit is contained in:
29
Universidad/base_page.master.cs
Normal file
29
Universidad/base_page.master.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user