I'm using the portal templates and have a usercontrol like this.
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Banner.ascx.cs" Inherits="Controls_Banner" %>
<cms:CMSEditableImage ID="BannerEditable" runat="server" ImageHeight="953" ImageWidth="129" ImageCssClass="banner" ToolTip='<%=CMSContext.CurrentDocument.DocumentName %>' InheritContent="true" />
what i want to do is allow the image to be editable and different on all but a few pages that meet the following condition. so in the usercontrol code behind i have this.
protected override void OnPreRender(EventArgs e)
{
if (CMSContext.CurrentDocument.NodeClassName == "document.class")
{
base.OnPreRender(e);
BannerEditable.LoadContent(CMS.PortalEngine.PageInfoProvider.GetPageInfo(CMSContext.CurrentSiteName, "/Products", CMSContext.CurrentDocumentCulture.CultureCode, null, true, CMS.DataEngine.ConnectionHelper.GetConnection()));
BannerEditable.SaveContent(CMS.PortalEngine.PageInfoProvider.GetPageInfo(CMSContext.CurrentSiteName, CMSContext.CurrentDocument.NodeAliasPath,CMSContext.CurrentDocumentCulture.CultureCode, null, true, CMS.DataEngine.ConnectionHelper.GetConnection()));
}
}
this will display the correct image in the cms edit mode but wont display on the live site until i click save.
i've tried using the node.update() as outlined here
http://devnet.kentico.com/docs/devguide/update_document.htmany ideas?