Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
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?
Hi,
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!
Glad to help. Please use the "Mark reply as answer" feature so others can see the thread is solved.
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.