Title: Programmatically Delete Site Collection
Code:
Code:
void DeleteSiteCollection(string requestUrl, string siteUrl)
{
SPSite site = new SPSite(requestUrl);
SPWeb web = null;
try
{
SPWebApplication webapp = site.WebApplication;
web = site.OpenWeb();
SPSiteCollection spSites = webapp.Sites;
webapp.Sites.Delete(siteUrl);
}
finally
{
}
}
Comments
i want to remove a user from a sitecollection what shud be the code used.can u pls post a saple one.
if i want to remove his permisions
also, while deleting, how cna i achieve.
thnx in advance
prasad
http://codename-srini.blogspot.com/2010/02/delete-user-from-site-collection.html