Microsoft
70-573 · Question #277
You have a list named Projects that contains a column named ClassificationMetadata. You need to create a Web Part that updates the ClassificationMetadata value to NA for each item in the Projects…
The correct answer is A. currentItem["ClassificationMetadata"] = "NA". MNEMONIC RULE: "it's simple: ["ClassificationMetadata"] = "NA"" SPListItem Class
Developing for Data Access
Question
You have a list named Projects that contains a column named ClassificationMetadata. You need to create a Web Part that updates the ClassificationMetadata value to NA for each item in the Projects list. You write the following code segment. (Line numbers are included for reference only.) 01 foreach (SPListItem currentItem in SPContext.Current.Web.Lists["Projects"]. Items) 02 { 03 04 } Which code segment should you add at line 03?
Options
- AcurrentItem["ClassificationMetadata"] = "NA";
- BcurrentItem.Fields["ClassificationMetadata"].DefaultFormula = "NA";
- CcurrentItem.Fields["ClassificationMetadata"].DefaultValue = "NA";
- DcurrentItem["Value"] = "ClassificationMetadata/NA";
How the community answered
(38 responses)- A74% (28)
- B8% (3)
- C3% (1)
- D16% (6)
Explanation
MNEMONIC RULE: "it's simple: ["ClassificationMetadata"] = "NA"" SPListItem Class
Topics
#SPListItem#list item update#SharePoint list#field value
Community Discussion
No community discussion yet for this question.