nerdexam
Microsoft

70-573 · Question #145

You need to create a Web Part that will store and retrieve information for the current subsite. Which object should you use?

The correct answer is D. SPContext.Current.Web.Properties. 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

Developing for Data Access

Question

You need to create a Web Part that will store and retrieve information for the current subsite. Which object should you use?

Options

  • ASPContext.Current.Site.RootWeb.AllProperties
  • BSPContext.Current.Site.RootWeb.Configuration
  • CSPContext.Current.Web.Configuration
  • DSPContext.Current.Web.Properties

How the community answered

(21 responses)
  • A
    5% (1)
  • B
    19% (4)
  • C
    5% (1)
  • D
    71% (15)

Explanation

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

Topics

#SPContext#Web property bag#subsite properties#AllProperties

Community Discussion

No community discussion yet for this question.

Full 70-573 Practice