コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["User"] == null) Response.Redirect("Default.aspx");

        // выводим доступные кнопки
        Person user = (Person)Session["User"];
        Display disp = new Display();
        if (user.Roles == null) ContentPlaceHolder1.Visible = false;
        MenuBar.Text = disp.DisplayMenuBar(user.Roles);
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["User"] == null) Response.Redirect("Default.aspx");

        // выводим доступные кнопки
        Person user = (Person)Session["User"];
        Display disp = new Display();
        //if (user.Roles == null) ContentPlaceHolder1.Visible = false;
        MenuBar.Text = disp.DisplayMenuBar(user.Roles);

        if (Request.QueryString["url"] != null)
        {
            EncryptedQueryString QueryString = new EncryptedQueryString(Request.QueryString["url"]);
            PageToLoad = QueryString["page"];
        }
    }