Question:You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
All the content pages in the application use a single master page. The master page uses a static navigation menu to browse the site.
You need to ensure that the content pages can optionally replace the static navigation menu with their own menu controls.
What should you do?

 

A Add the following code fragment to the master page.
< asp:PlaceHolder ID="MenuPlaceHolder " runat="server" >
< div id="menu" >
< !-- Menu code here -- >
< /div >
< /asp:PlaceHolder > 

B Add the following code segment to the Page_Load event of the content page.
PlaceHolder placeHolder =
Page.Master.FindControl("MenuPlaceHolder") as PlaceHolder;
Menu menuControl = new Menu();
placeHolder.Controls.Add(menuControl); 

C Add the following code fragment to the master page.
< asp:PlaceHolder ID="MenuPlaceHolder " runat="server" >
<!-- Menu code here -->
</asp:PlaceHolder > 

D Add the following code fragment to the content page.
< asp:Content PlaceHolderID="MenuPlaceHolder" >
< asp:menu ID="menuControl" runat="server" >
</asp:menu >
</asp:Content > 

E Add the following code fragment to the master page.
< asp:ContentPlaceHolder ID="MenuPlaceHolder " runat="server" >
< !-- Menu code here -- >
< /asp:ContentPlaceHolder > 

F Add the following code fragment to the content page.
< asp:Content ContentPlaceHolderID="MenuPlaceHolder" >
< asp:menu ID="menuControl" runat="server" >
< /asp:menu > < /asp:Content > 

G Add the following code fragment to the master page.
< asp:ContentPlaceHolder ID="MenuPlaceHolder " runat="server" >
< !-- Menu code here -- >
< /asp:ContentPlaceHolder > 

H Add the following code segment to the Page_Load event of the content page.
ContentPlaceHolder placeHolder =
Page.Master.FindControl("MenuPlaceHolder") as ContentPlaceHolder; Menu menuControl = new Menu
() ;
placeHolder.Controls.Add(menuControl); 

+ Answer
+ Report
Total Preview: 1030

Copyright © 2024. Powered by Intellect Software Ltd