You need to ensure that the menu items are populated from an array of strings in your code-behind file

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?

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?

A.
Write a JavaScript function that uses document.write to write out an asp:MenuItem for each string array
element.

B.
In the Page_Render handler, use Response.Write towrite out an asp:MenuItem for each string array
element.

C.
Set the DataSource attribute of asp:Menu to the name of the array.

D.
In the Page_Load handler, create an instance of asp:MenuItem for each string array element, and add each
of these instances to the menu’s Items collection.



Leave a Reply 0

Your email address will not be published. Required fields are marked *