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

Set value of property on new page on LoadedPage

Vote:
 
Hello, I want to set a property to a default value (depending on values in PersonalizedData) when a new page is created (new page in edit-mode). I can access the PageData-object in the LoadedPage event in global.asax, but how do I know if the page is created or not? The default value should only be set if the page has not yet been created. Thanks / Christoffer
#13031
May 08, 2007 10:46
Vote:
 
Hi Christoffer! You might want to check out the LoadedDefaultPageData event instead, it will be called after all default pagedata has been set for a new page. (There's also a LoadingDefaultPageData event called before the standard default pagedata is assigned). Example: Global.EPDataFactory.LoadedDefaultPageData += new PageEventHandler(EPDataFactory_LoadedDefaultPageData); protected void EPDataFactory_LoadedDefaultPageData(object sender, PageEventArgs e) { e.Page["PageName"] = "The PageName"; } Regards, Johan Olofsson
#15280
May 08, 2007 11:25
* 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.