Reputation: 11788
Is there an easy way to programmatically know if the current page is a site homepage from a webpart code behind?
Upvotes: 1
Views: 5643
Reputation: 11788
I think I've found the answer here: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spcontextpageinfo.iswebwelcomepage.aspx
Upvotes: 1
Reputation: 33511
I think this post might answer your question: https://stackoverflow.com/questions/1649833/replace-the-default-page-in-a-sharepoint-website
Upvotes: 1
Reputation: 161773
I would recommend that you permit the homepage to tell your web part that it is a homepage. Add a parameter to the web part and allow it to be set in the Edit dialog.
Upvotes: 0