Events in ASP.NET Master and Content Pages
-
Content page PreInit event.
-
Master page controls Init event.
-
Content controls Init event.
-
Master page Init event.
protected void Page_Init(object sender, EventArgs e) { //do something }
-
Content page Init event.
-
Content page Load event.
-
Master page Load event.
-
Master page controls Load event.
-
Content page controls Load event.
-
Content page PreRender event.
-
Master page PreRender event.
-
Master page controls PreRender event.
-
Content page controls PreRender event.
-
Master page controls Unload event.
-
Content page controls Unload event.
-
Master page Unload event.
-
Content page Unload event.
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; } }
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。