-
Notifications
You must be signed in to change notification settings - Fork 0
/
MasterPage.master.cs
43 lines (40 loc) · 1.19 KB
/
MasterPage.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
using System;
using System.Collections.Generic;
using System.Linq;
using BusinessController;
using System.Web.UI;
using UsersApp;
using System.Web.UI.WebControls;
public partial class MasterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (!string.IsNullOrEmpty(Page.User.Identity.Name))
{
logout.Visible = false;
Users p = Users.GetUserid(Convert.ToInt32(Page.User.Identity.Name));
if (p != null)
{
LoginSection.Visible = false;
musername.InnerText = p.UserName;
logout.Visible = true;
yourlist.Visible = true;
hello.Visible = true;
}
else
{
LoginSection.Visible = true;
}
}
else
{
LoginSection.Visible = true;
logout.Visible = false;
yourlist.Visible = false;
hello.Visible = false;
}
}
}
}