Created
September 15, 2015 20:34
-
-
Save bjorn-ali-goransson/07aba0cad0af7be2fb5a to your computer and use it in GitHub Desktop.
Remove EPiServer content programmatically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" %> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
</head> | |
<body> | |
<form id="form1" runat="server"> | |
<div> | |
<script runat="server"> | |
protected override void OnLoad(EventArgs e) | |
{ | |
base.OnLoad(e); | |
EPiServer.DataFactory.Instance.Delete(new EPiServer.Core.ContentReference(333303), true, EPiServer.Security.AccessLevel.NoAccess); | |
} | |
</script> | |
</div> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment