-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSite1.Master.cs
More file actions
35 lines (34 loc) · 1.08 KB
/
Site1.Master.cs
File metadata and controls
35 lines (34 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Assignment3
{
public partial class Site1 : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["id"] == null)
{
log.Text = "Login <span class='glyphicon glyphicon-user'/>";
log.NavigateUrl = "login.aspx";
reg.Text = "Register";
reg.NavigateUrl = "reg2.aspx";
}
else
{
log.Text = "Logout";
log.NavigateUrl = "logout.aspx";
myBooks.Text = "My books <span class='glyphicon glyphicon-book'/>";
myBooks.NavigateUrl = "myBooks.aspx";
if (Session["id"].ToString().Trim() == "2")
{
addBks.Text = "Add Books <span class='glyphicon glyphicon-plus'/>";
addBks.NavigateUrl = "addBks.aspx";
}
}
}
}
}