public override void FeatureActivated(SPFeatureReceiverProperties properties)
{using (SPSite site = properties.Feature.Parent as SPSite)
{
using (SPWeb web = site.OpenWeb())
{
SPFolder objroot = web.RootFolder;
objroot.WelcomePage = "folder/myhomepage.aspx";
try
{
objroot.ParentWeb.AllowUnsafeUpdates = true;objroot.Update();
}
finally
{
objroot.ParentWeb.AllowUnsafeUpdates = false;
}
}
}
}
No comments:
Post a Comment