Events in ASP.NET Master and Content Pages

时间:2014-08-12 13:18:24   收藏:0   阅读:208
  1. Content page PreInit event.

  2. Master page controls Init event.

  3. Content controls Init event.

  4. Master page Init event.

protected void Page_Init(object sender, EventArgs e)
{
       //do something      
}

 

  1. Content page Init event.

  2. Content page Load event.

  3. Master page Load event.

  4. Master page controls Load event.

  5. Content page controls Load event.

  6. Content page PreRender event.

  7. Master page PreRender event.

  8. Master page controls PreRender event.

  9. Content page controls PreRender event.

  10. Master page controls Unload event.

  11. Content page controls Unload event.

  12. Master page Unload event.

  13. Content page Unload event.

bubuko.com,布布扣
public class PageHelper
    {
        public static string CurrentPageModuleId
        {
            get
            {
                return Convert.ToString(HttpContext.Current.Request.QueryString["mid"]);
            }
        }

        public bool HasPagePermission()
        {
            if (string.IsNullOrEmpty(CurrentPageModuleId))
                return false;

            return HasPagePermission(CurrentPageModuleId);
        }

        public bool HasPagePermission(string moduleId)
        {
            return true;
        }

        public bool HasFunctionPermission(string moduleFunctionType)
        {
            if (string.IsNullOrEmpty(CurrentPageModuleId))
                return false;

            return HasFunctionPermission(CurrentPageModuleId, moduleFunctionType);
        }

        public bool HasFunctionPermission(string moduleId, string moduleFunctionType)
        {
            return true;
        }
    }
View Code

 

Events in ASP.NET Master and Content Pages,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!