IPageDataContextRetrieverTryRetrieveTPageType Method |
Tries to retrieve 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 bool TryRetrieve<TPageType>(
out IPageDataContext<TPageType> data
)
where TPageType : TreeNode
Parameters
- data
- Type: Kentico.Content.Web.MvcIPageDataContextTPageType
The current page data context if the retrieval is successful.
Type Parameters
- TPageType
- The type of the page to return.
Return Value
Type:
BooleanReturns
true if the current page data context retrieval is successful.
Exceptions Exception | Condition |
---|
InvalidCastException | Is thrown when the page is not of given type. |
See Also