本文整理匯總了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();
}
}