Delete a page from database

Namespace:  EPiServer.Core
Assembly:  EPiServer (in EPiServer.dll) Version: 5.2.375.236

Syntax

C#
void Delete(
	PageReference pageLink,
	bool forceDelete
)

Parameters

pageLink
Type: EPiServer.Core..::.PageReference
The link to the page which will be deleted
forceDelete
Type: System..::.Boolean
Delete page even if being linked by other pages

Return Value

True if the delete was successful

Exceptions

ExceptionCondition
EPiServer.Core..::.AccessDeniedExceptionThrown when user doesnt have enough access right to perform this action

See Also