Cant get PageEventhandlers to fire and non working example in SDK

Vote:
 
Example from SDK: //Modify values for page properties when loading the page for editing in edit mode public class Global : EPiServer.Global { protected void Application_Start(Object sender, EventArgs e) { EditPanel.LoadedPage += new LoadedPageEventHandler(EditPanel_LoadedPage); } protected void EditPanel_LoadedPage(EditPanel sender, LoadedPageEventArgs e) { e.Page.PageName += "[Test]"; e.Page["PageChangedOnPublish"] = true; } "The type or namespace EditPanel could not be found...." Also I cannot get any of the Pageeventshandlers in Global.asax to fire. When using for example: DataFactory.Instance.LoadingPage += new PageEventHandler(Instance_Loading); //Jocke
#15758
Mar 25, 2008 19:07
Vote:
 
PageEventHandlers not fireing problem is solved, missmatach betwwen global.asax and global.asax.cs :/ But the example from the SDK still not working...
#16293
Mar 25, 2008 19:08
Vote:
 
Hi Joakim! Thank you for pointing out that there is a mismatch between the global.asax and the global.asax.cs file. We are looking into this. For anyone else that is having this problem just change the inherits attribute of the Global.asax file to "EPiServer.Templates.Global". After I did this I got the sample working. I had to add a reference to the EPiServer.UI for my project and also add using EPiServer.UI.Edit; to the Global.asax.cs file.
#16294
Mar 25, 2008 19:08
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.