protected void Page_Load(object sender, EventArgs e) { // Deny normal user access if (Session["userType"].ToString() == Reference.USR_MEM) { /* string script = "alert('You do not have access to the page.');"; * ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert", script, true); */ ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "alert('You do not have access to this page'); window.location='" + Request.ApplicationPath + "ProfileInfo.aspx';", true); } if (Convert.ToInt32(Session["CoUpdate"]) == 2) { updateSuccess.Visible = true; Session.Remove("CoUpdate"); } if (Convert.ToInt32(Session["CoCreate"]) == 2) { createSuccess.Visible = true; Session.Remove("CoCreate"); } if (!IsPostBack) { Company_Management coMgmt = new Company_Management(); DataTable dt = coMgmt.CoInfoRead(); //GridView3.DataSource = dt; GridView3.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (Convert.ToInt32(Session["CoUpdate"]) == 2) { updateSuccess.Visible = true; Session.Remove("CoUpdate"); } if (Convert.ToInt32(Session["CoCreate"]) == 2) { createSuccess.Visible = true; Session.Remove("CoCreate"); } if (!IsPostBack) { Company_Management coMgmt = new Company_Management(); DataTable dt = coMgmt.CoInfoRead(); //GridView3.DataSource = dt; GridView3.DataBind(); } }