| 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
SyntaxIPageDataContext<TPageType> Retrieve<TPageType>()
where TPageType : TreeNode
Type Parameters
- TPageType
- The type of the page to return.
Return Value
Type:
IPageDataContextTPageType
Exceptions| 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