1

I found that I can set this property for any folder in a library. But what does it do? I thought I would get redirected to this welcome page when I click in the folder. Instead nothing is happening.

Does anyone know if this property can be used somehow? I'm intrigued to know.

2 Answers 2

0

That property is used by Publishing sites to set the Home Page.

SPWeb.RootFolder.WelcomePage

You can also use similar technic to set List welcome page

SPList.RootFolder.WelcomePage

We can't have a welcome page for each of the sub folders. Folder is a container of items and it doesn't make sense to have a separate welcome page for folders.

1
  • oh well, you are probably right Apr 29, 2015 at 12:40
0

Gets or sets the URL to which users are redirected when they browse to the folder.

A string that contains the URL to which users are redirected. For a wiki site, the string specifies a site-relative URL, for example, MyWikiFolder/MyWelcomePage.aspx, but for a wiki library, the string specifies a folder-relative URL, for example, MyWelcome.aspx.

SPFolder.WelcomePage Property

Example

    SPSite site = new SPSite("http://server:100/sites/InternetSite/");

SPWeb web = site.OpenWeb();

SPFolder folder = web.RootFolder;

folder.WelcomePage = "TestWiki/Hello1.aspx";

folder.Update();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.