Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

SiteDefinition.Current.StartPage vs ContentReference.StartPage



Is there a difference between these 2? If so which one should I use?

Mar 22, 2015 20:41

I don't think there are any differens, but I would use the site definition one.

I must check the code to verify how they work (maby someone else will do it before me)

Mar 23, 2015 8:11


There is no difference in the functionality (I just did check the code:)). ContentReference.StartPage uses the SiteDefinition. One benefit of SiteDefinition (but not SiteDefinition.Current) is that it can be used as a service in dependency injection, so you would not need any static access that could be a problem when writing unit tests.


Per Gunsarfs

Mar 23, 2015 9:24
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.