Microsoft Content Management Server - Set expiry date of the posting programatically

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > June 2006 > Set expiry date of the posting programatically





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Set expiry date of the posting programatically
s21136638@tuks.co.za

2006-06-26, 1:18 pm

Hi

I am asking if it is possible to set the expiry date of the posting
programmatically in C#
I am using this code i want the users to set the expiry date using to
htmplaceholders one for the Datetime and one for the time.

cmsContext.CommitAll();
Posting conPosting = CmsHttpContext.Current.Posting;
conPosting.ExpiryDate = DateTime.Now;//It will be placeholder name.
conPosting.Approve();
cmsContext.CommitAll();

I getting this error.
Invalid mode for update. The requested action modifies the state of an
object and can only be performed when the session is in the 'Update'
mode.

The reason why i am doing that the users dont want to use page property
to set the expiry date

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com