using RootWeb (SPGroupCollection.Add Method (Microsoft.SharePoint))
Updated Microsoft guidance is to not dispose SPSite.RootWeb. This is particularly important for SPContext.Current, as that reference will almost certainly be used elsewhere in the page lifecycle.
Last modified by Keith Dahlby on 5/29/2009 6:53:35 AM
To apply changes to a single web application, you can use code like this:
SPWebApplication webApp = oWebSite.Site.WebApplication;webApp.WebConfigModifications.Add(myModification);webApp.Update();SPWebService.ContentService.ApplyWebConfigModificat...
Last modified by Keith Dahlby on 5/26/2009 5:06:45 PM
This property returns a new SPSite on each call and should be disposed by the caller.// Use ServerContext.Current in web contextServerContext context = ServerContext.GetContext(site);UserProfile myProfile = ProfileLoader.GetProfileLoader(context)....
Last modified by Keith Dahlby on 3/19/2009 9:56:56 PM
Tags: None
listProperties also supports an OnQuickLaunch boolean attribute to specify if the list should appear on the Quick Launch bar.
Last modified by Thomas Lee on 3/17/2009 4:19:10 PM
# Get-RegexTest.ps1
# Sample Using PowerShell
# Thomas Lee - tfl@psp.co.uk
# Define a regular expression for currency values.
$rx = [Regex] "^-?\d+(\.\d{2})?$"
# Define tests
$tests = "-42", "19.99", "0.001", "100 USD", ".34", "0.34", "1,052...
Last modified by Keith Dahlby on 3/9/2009 8:03:38 PM
<< Previous |
Next >> |
Show All