Microsoft
70-515 · Question #162
You create a Web page that has an ASP.NET menu. You need to ensure that the menu items are populated from an array of strings in your code- behind file. What should you do?
The correct answer is D. In the Page_Load handler, create an instance of asp:MenuItem for each string array element. See the full explanation below for the reasoning.
Question
You create a Web page that has an ASP.NET menu. You need to ensure that the menu items are populated from an array of strings in your code- behind file. What should you do?
Options
- AWrite a JavaScript function that uses document.write to write out an asp:MenuItem for each
- BIn the Page_Render handler, use Response.Write to write out an asp:MenuItem for each
- CSet the DataSource attribute of asp:Menu to the name of the array.
- DIn the Page_Load handler, create an instance of asp:MenuItem for each string array element,
How the community answered
(54 responses)- A4% (2)
- B7% (4)
- C13% (7)
- D76% (41)
Community Discussion
No community discussion yet for this question.