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

CurrentPage.Property.Exists is obsolete...

Vote:
 
..check if EPiServer.Core.PageData.Property indexer returns null to see if it exists That is the message I get. I want to check if a dynamic property has been given a value. My guess is that if it has not been given an value, then the property does not exist for the current page. In 4.61 I could use Property.Exists to check if the page had a specific proeprty. What should I use in 5.1?
#15889
Nov 22, 2007 14:52
Vote:
 
Was in 4.6: if (CurrentPage.Property.Exists("SiteFooter")) Becomes in 5.1: if (CurrentPage.Property["SiteFooter"] != null)
#16578
Nov 22, 2007 16:55
Vote:
 
I realy thought that was the first thing I tried, and it didn't work... But since this works, I must hav been wrongthe first time. Thanks mate! :)
#16579
Nov 23, 2007 11:26
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.