Home » Microsoft » 70-573 » Which object should you use?
You need to create a Web Part that will store and retrieve information for the current subsite.
Which object should you use?
A. SPContext.Current.Site.RootWeb.AllProperties
B. SPContext.Current.Site.RootWeb.Configuration
C. SPContext.Current.Web.Configuration
D. SPContext.Current.Web.Properties
Correct Answer: D
Explanation/Reference:
MNEMONIC RULE: "information is in Web.Properties" SPContext.Current.Web is SPWeb object.
Properties is the SPPropertyBag object with the metadata for the website.
SPWeb.Properties Property
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.properties.aspx