IPageDataContextRetrieverRetrieveTPageType Method |
Retrieves the current page data context.
Namespace: Kentico.Content.Web.MvcAssembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax IPageDataContext<TPageType> Retrieve<TPageType>()
where TPageType : TreeNode
Type Parameters
- TPageType
- The type of the page to return.
Return Value
Type:
IPageDataContextTPageTypeExceptions Exception | Condition |
---|
InvalidCastException | Is thrown when the page is not of given type. |
InvalidOperationException | Is thrown when the data context is not initialized. |
See Also