Delete a page from database
Namespace:
EPiServerAssembly: EPiServer (in EPiServer.dll) Version: 6.0.530.0
Syntax
| C# |
|---|
public void Delete( PageReference pageLink, bool forceDelete, AccessLevel access ) |
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
- access
- Type: EPiServer.Security..::.AccessLevel
The required access level for delete
Return Value
True if the delete was successful
Exceptions
| Exception | Condition |
|---|---|
| EPiServer.Core..::.AccessDeniedException | Thrown AccessDeniedException when user doesnt have access right to perform this action |
| System..::.ArgumentNullException | Thrown when the pageLink is NOT vaild |
| EPiServer.Core..::.EPiServerCancelException | Thrown when the DeletingEvent be canceled |