Events in ASP.NET Master and Content Pages
时间:2014-08-12 13:18:24
收藏:0
阅读:208
-
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; } }
评论(0)