70-573 · Question #269
You create a Web Part. The Web Part contains a grid view named GridView1 and the following code segment. (Line numbers are included for reference only.) 02 MyGridView.DataSource = from announce In…
The correct answer is C. Add the following line of code at line 03. MNEMONIC RULE: "only WHERE is missing" Just remember the order of LINQ query: FROM-WHERE-SELECT Using LINQ to SharePoint
Question
You create a Web Part. The Web Part contains a grid view named GridView1 and the following code segment. (Line numbers are included for reference only.) 02 MyGridView.DataSource = from announce In dc.Announcements _ ; 03 04 Select announce IntranetDataContext is a LINQ context. You need to ensure that GridView1 only displays items from Announcements that have an expiry date that is greater than or equal to the current date. What should you do?
Options
- AChange line 04 to the following code segment:
- BChange line 04 to the following code segment:
- CAdd the following line of code at line 03:
- DAdd the following line of code at line 03:
How the community answered
(25 responses)- A4% (1)
- B4% (1)
- C84% (21)
- D8% (2)
Explanation
MNEMONIC RULE: "only WHERE is missing" Just remember the order of LINQ query: FROM-WHERE-SELECT Using LINQ to SharePoint
Topics
Community Discussion
No community discussion yet for this question.