Click or drag to resize
IPageDataContextRetrieverTryRetrieveTPageType Method
Tries to retrieve the current page data context.

Namespace: Kentico.Content.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax
C#
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: Boolean
Returns true if the current page data context retrieval is successful.
Exceptions
ExceptionCondition
InvalidCastExceptionIs thrown when the page is not of given type.
See Also