本文整理汇总了C#中System.PageInfo.Load方法的典型用法代码示例。如果您正苦于以下问题:C# PageInfo.Load方法的具体用法?C# PageInfo.Load怎么用?C# PageInfo.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.PageInfo
的用法示例。
在下文中一共展示了PageInfo.Load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
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();
}
}