-
Notifications
You must be signed in to change notification settings - Fork 0
/
UserMaster.master.cs
78 lines (76 loc) · 3.23 KB
/
UserMaster.master.cs
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class UserMaster : System.Web.UI.MasterPage
{
public static string _bmi="",_bmr="",_ht="",_uv="",_mp="",_ep="",_ct="",_a="",_c = "",_ue="";
protected void Page_Load(object sender, EventArgs e)
{
if (Session["UserId"] != null)
{
lblUsr.Text = Session["UserName"].ToString();
if (!IsPostBack)
{
_bmi = ""; _bmr = ""; _ht = ""; _uv = ""; _mp = ""; _ep = ""; _ct = ""; _a = ""; _c = ""; _ue = "";
if (Request.QueryString["pg"] != null)
{
if (Request.QueryString["pg"].ToString() != null)
{
if (Request.QueryString["pg"].ToString() == "bmi")
{
_bmi = "style='border-bottom: 2px solid #469feb;'";
}
else if (Request.QueryString["pg"].ToString() == "bmr")
{
_bmr = "style='border-bottom: 2px solid #469feb;'";
}
else if (Request.QueryString["pg"].ToString() == "ht")
{
_ht = "style='border-bottom: 2px solid #469feb;'";
}
else if (Request.QueryString["pg"].ToString() == "uv")
{
_uv = "style='border-bottom: 2px solid #469feb;'";
}
else if (Request.QueryString["pg"].ToString() == "mp")
{
_mp = "style='border-bottom: 2px solid #469feb;'";
}
else if (Request.QueryString["pg"].ToString() == "ep")
{
_ep = "style='border-bottom: 2px solid #469feb;'";
}
else if (Request.QueryString["pg"].ToString() == "ct")
{
_ct = "style='border-bottom: 2px solid #469feb;'";
}
else if (Request.QueryString["pg"].ToString() == "a")
{
_a = "style='border-bottom: 2px solid #469feb;'";
}
else if (Request.QueryString["pg"].ToString() == "c")
{
_c = "style='border-bottom: 2px solid #469feb;'";
}
else if (Request.QueryString["pg"].ToString() == "ue")
{
_ue = "style='border-bottom: 2px solid #469feb;'";
}
}
}
}
}
else
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Session Expired! Please login again.');window.location ='Login.aspx';", true);
}
}
protected void btnLogOut_Click(object sender, EventArgs e)
{
Session.Clear();
Response.Redirect("Login.aspx");
}
}