No SPSite.Properties properties

Jan 19, 2010 at 5:46 PM

Hi,

SPSite does not have a Properties property. I think your code in the download is using the properties bag of the root web instead.

The sample on the home page of this project can't work:

string propertyValue = String.Empty;
string propertyName = "ConnectionString";

using (SPSite site = new SPSite(SPContext.Current.Web.Url))
{
if (site.Properties.ContainsKey(propertyName))
propertyValue = site.Properties[propertyName];
}

You could use site.RootWeb.Properties...

Mike