November Happy Hour will be moved to Thursday December 5th.

Modified data in SavingPage event is not reflected in editor when using Save button

Vote:
 
Hi! I do something similar to this example from the documentation: private void onSavingPage(object sender, EPiServer.PageEventArgs e) { if (e.Page.Property.Exists("MainBody")) { string sMainBody = (string)e.Page.Property["MainBody"].Value; // Replace XML and tags using the following regular expression sMainBody = System.Text.RegularExpressions.Regex.Replace(sMainBody, @"(<\?.*\ />)|(]*>)|(<]*>)", ""); e.Page.Property["MainBody"].Value = sMainBody; } } // This hooks the event protected void Application_Start(Object sender, EventArgs e) { EPDataFactory.SavingPage += new EPiServer.PageEventHandler(onSavingPage); } And the property value is modified as you would expect. However the new value of the property is not reflected in the editor when you use the Save-button. It works fine when you do a Publish or Save and view (but then you also have a switch of views/a new read from server). So it seems like when you hit Save, it doesn't do a new read from server, but only use the viewstate or something...? Is there a solution out there? Thanks!
#12978
Mar 23, 2007 15:53
* 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.