Welcome to my personal blog, All the information in this bogs is my ideas,findings and thoughts on .Net, Asp.Net and SharePoint.
ALL POSTING ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND
Some SharePoint objects needs an instance to work perfectly, one example is here;
Sample 2 works however the Sample 1 doesn't :)
Sample1
SPSite site = new SPSite("http://server:100/sites/InternetSite/");
SPWeb web = site.OpenWeb();
web.RootFolder.WelcomePage=”TestWiki/Hello.aspx”;
web.RootFolder.Update();
Sample 2
SPSite site = new SPSite("http://server:100/sites/InternetSite/");
SPWeb web = site.OpenWeb();
SPFolder folder = web.RootFolder;
folder.WelcomePage = "TestWiki/Hello1.aspx";
folder.Update();
Anonymous comments are disabled