Hi techies,
In one of my event receiver i tried to set a page as home page but couldn't succeed in it.
Here is the code snippet which i tried:
SPFolder libraryFolder = newWeb.GetFolder("Page");
SPFileCollection files = libraryFolder.Files;
SPFile newFile = files.Add(newFilename, stream);
libraryFolder.Update();
stream.Close();
libraryFolder.WelcomePage = "Home.aspx"; //custom landing page
libraryFolder.Update();Anybody came across the same issue.
Please let me know.