protected void Page_Load(object sender, EventArgs e) { string loginRole = Session["loginRole"].ToString(); if (loginRole == "emp" || loginRole == "rep") { Label1.Text = Session["loginName"].ToString(); string loginID = Session["loginID"].ToString(); img.Src = "../picture/" + loginID + ".jpg"; NotificationDAO nDAO = new NotificationDAO(); var deptNotifications = nDAO.getNewDeptNotificationByID(loginID); notificationNum.Text = deptNotifications.Count.ToString(); } else { Response.Redirect("login.aspx"); } }