Try our conversational search powered by Generative AI!

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
Sep 11, 2007 8:16
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
Sep 11, 2007 8:39
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
Sep 11, 2007 12:54
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.
* 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.