how to change default page url in team site in sharepoint 2007
i need to change all the sub-site default page url to my custom layout page url.
for ex: i have a one sub site call : http://test:1210/Site1/default.aspx. using coding i want to set this to : http://test:1210/Site1/_layouts/pages/test1.aspx.
is it possible in team site to change default page url using coding.
Team site default pages are default.aspx, so you have to do something like this:
http://attis.org/blogs/dan/archive/2008/10/29/how-to-change-the-default-page-of-a-sharepoint-site-using-a-feature.aspx
If you were using the publishing feature, you could set the welcome page
https://serverfault.com/questions/183943/change-sharepoint-team-site-home-page
Here is the easiest way to set the default page in a Team Site from code behind :
SPFolder rootFolder = Web.RootFolder; // root folder of the web object
rootFolder.WelcomePage = "SitePages/xyz.aspx"; // url of the page you want to set as default page
rootFolder.Update();
精彩评论