protected void Page_Load(object sender, EventArgs e) { if (Session["DBName"] == null || Session["UserName"] == null) { Response.Redirect("LogOut.aspx"); } BindDropdownDAL objPopmsg = new BindDropdownDAL(); tblPopUpMessage msgobj = objPopmsg.CheckSiteoffMessage(); if (Convert.ToBoolean(msgobj.PopUp_Bit)) { divMessagePopMsg.Visible = true; divMessagePopMsg.InnerText = msgobj.PupUp_Message.ToString(); } else { divMessagePopMsg.Visible = false; } }