locked
How to set Application page as Welcome page? RRS feed

  • Question

  • I´m having a strange problem. I want to set an application page as welcome page in my site collection. 
    At the moment I´m trying to use a site feature with the following code:

        SPFolder rootFolder = site.RootFolder;
      rootFolder.WelcomePage = "Layouts/Pages/StartPage.aspx";
      rootFolder.Update();

      site.Update();

    But it doesen´t work. What am I doing wrong?

    Very thankful for any idea or answer!

    Friday, May 27, 2011 8:21 AM

Answers

  • this would not be possible by OOTB features of SharePoint what you can do is create a home page in site and use JavaScript to redirect it to new application page.

    although it is hard to get why you need this functionality as application pages are not for this purpose


    Best Regards, Ashutosh | SharePoint World
    • Marked as answer by Wayne Fan Thursday, June 2, 2011 11:40 AM
    • Unmarked as answer by hemanthlaxmi Friday, August 5, 2011 3:51 AM
    • Marked as answer by hemanthlaxmi Friday, August 5, 2011 3:51 AM
    Friday, May 27, 2011 9:08 AM

All replies

  • Hi

    In SHP Designer, connect to your site, select the page, right click, and select: Set as Home Page


    romeo donca
    Friday, May 27, 2011 8:42 AM
  • this would not be possible by OOTB features of SharePoint what you can do is create a home page in site and use JavaScript to redirect it to new application page.

    although it is hard to get why you need this functionality as application pages are not for this purpose


    Best Regards, Ashutosh | SharePoint World
    • Marked as answer by Wayne Fan Thursday, June 2, 2011 11:40 AM
    • Unmarked as answer by hemanthlaxmi Friday, August 5, 2011 3:51 AM
    • Marked as answer by hemanthlaxmi Friday, August 5, 2011 3:51 AM
    Friday, May 27, 2011 9:08 AM