protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["Page"] == null) { (Master as Dreadnought_Master).Message("No page specified. Please use the querystring Page to specify the full relative path to a page."); DisableAll(); return; } pageInfo = new PageInfo(Request.QueryString["Page"]); try { pageInfo.Load(); } catch (PageDoesNotExistException) { (Master as Dreadnought_Master).Message("The specified page does not exist (<a href=\"CreatePage.aspx?Page=" + pageInfo.RelativePath + "\">Create it</a>)."); DisableAll(); return; } catch (InvalidDirectoryException) { (Master as Dreadnought_Master).Message("You are not allowed to load a page from the directory '" + pageInfo.RelativeDirectory + "'."); DisableAll(); return; } catch { (Master as Dreadnought_Master).Message("An unexpected error occurred. Please make sure you have sufficient user rights."); DisableAll(); return; } if (!IsPostBack) { LoadContentPlaceholders(); LoadText(); } }