Try our conversational search powered by Generative AI!

Clear value of StopPublish


I'm trying to clear the value of StopPublish of a page in code. How do I do this? I thought it would be a pretty simple thing to accomplish but it looks to be a lot harder.

May 22, 2013 11:40
May 23, 2013 16:02


May 23, 2013 16:03

You don't specify which EPiServer version, but in both EPiServer 6 and 7 the procedure would go something like this:

var clone = CurrentPage.CreateWriteableClone();

clone["PageStopPublish"] = null;

DataFactory.Instance.Save(clone, SaveAction.Publish , AccessLevel.NoAccess);


What code are you trying?

Edited, May 23, 2013 20:42


We're still in version 5 but your code works. Thank you! I had only tried setting clone.StopPublish = null and that has failed for me.

Thanks again! Have a nice weekend!

May 24, 2013 15:40

Glad to help. Please use the "Mark reply as answer" feature so others can see the thread is solved.

May 24, 2013 16:07
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.