I need to know if the current page is an EpiServer page or not. I need to know if the current page is the start page, I am using the following line of code.
if(PageReference.StartPage.ID == CurrentPage.PageLink.ID)
This works perfect on all EPiServers, but when I am on a non EPiServer page then CurrentPage returns values for the StarPage. This means that all my non-EPiServer pages are treated as a StartPage (just in my if statement of course).
One solution I thought of is to check first if the page is an EPiServer page? But don't know how to do this. Can I get the class for a page or how can I achieve this?
Any ideas or suggestions?
Thanks in advance.