SPSecurity.RunWithElevatedPrivileges(delegate()
{
SPSite mysite = new SPSite(txtURL.Text.Trim());
mysite.AllowUnsafeUpdates = true;
mysite.CatchAccessDeniedException = false;
foreach (SPWeb myweb in mysite.AllWebs)
{
//myweb.Title;
cboSites.Items.Add(myweb.Title);
}
});
No comments:
Post a Comment