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
Mar 25, 2008 19:07
Vote:
 
Was in 4.6: if (CurrentPage.Property.Exists("SiteFooter")) Becomes in 5.1: if (CurrentPage.Property["SiteFooter"] != null)
#16578
Mar 25, 2008 19:09
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
Mar 25, 2008 19:09
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.