empz
empz

Reputation: 11788

How to know programatically if current page is homepage in Sharepoint 2010?

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

Answers (3)

naivists
naivists

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

John Saunders
John Saunders

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

Related Questions