FineUI 官方论坛

标题: PageManager为啥不能扩展? [打印本页]

作者: yimi00    时间: 2018-8-2 14:46
标题: PageManager为啥不能扩展?
public class PageManager : FineUIPro.PageManager
    {
        public string Privilege { get; set; }
        protected override void OnInit(EventArgs e)
        {
            if (string.IsNullOrEmpty(this.Privilege))
            {
                return;
            }
            if (this.Privilege == "NoView")
            {
                this.Context.Response.Redirect("~/Stop.html");
            }
            base.OnInit(e);
        }
    }

我对PageManager扩展了一个属性,Debug时发现页面一直在加载,也没发现错误,PageManager不能扩展?


作者: sanshi    时间: 2018-8-5 22:51
类似的权限判断可以在页面的公共基类PageBase.cs中完成,类似代码:
  1. public class PageBase : System.Web.UI.Page
  2.     {

  3.         protected override void OnInit(EventArgs e)
  4.         {
复制代码





欢迎光临 FineUI 官方论坛 (https://fineui.com/BBS/) Powered by Discuz! X3.4