SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my publishing pages i have a custom user control that contains a SAVE button when the page is in Edit Mode. On click event of that button i do:; + " page saved"); + " page published");
Response.Redirect(SPContext.Current.Web.Url + "/" +;

But the contents are not being updated? What is wrong with it?

share|improve this question
up vote 1 down vote accepted

how about trying this code?

Microsoft.SharePoint.WebControls.SaveButton.SaveItem(SPContext.Current, false, "Time Saved = " + DateTime.Now);

also have the update at the bottom not top of the code stack, you could try somthing like this ;) :

hope it helps :)

share|improve this answer
thanks, i will try it when i go back to work tomorrow. but what is wrong with my way of doing save? – ozdogan Nov 27 '12 at 17:41
i think the issue is when you do it manually, by that i mean when you do it yourself on the page you check out the page then make the changes, you then save the page and the check in the page. The last step is to publish the page and update :) – ali Sharepoint Nov 27 '12 at 22:13
Hello it worked. Actually what to do after SaveButton.SaveItem() ? only page.Publish() ? – ozdogan Nov 28 '12 at 7:59
yes, do the checkin, then save then publish – ali Sharepoint Nov 28 '12 at 8:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.