This question is locked. New answers and comments are not allowed.
On my first stab at trying the controls, I followed the instructions then added the following menu to the site.master, however the page does not work, and I get an 'object reference not set...' for the menu control. Any help please:
| <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title> |
| <%= Html.Telerik().StyleSheetRegistrar() |
| .DefaultGroup(group => group.Add("telerik.common.css") |
| .Add("telerik.vista.css")) |
| %> |
| <link href="../../Content/Site.css" rel="stylesheet" type="text/css" /> |
| </head> |
| <body> |
| <div class="page"> |
| <div id="header"> |
| <div id="title"> |
| <h1>.NET MVC 2 Application</h1> |
| </div> |
| <div id="logindisplay"> |
| <% Html.RenderPartial("LogOnUserControl"); %> |
| </div> |
| <div id="menucontainer"> |
| <% |
| Html.Telerik().Menu() |
| .Name("menu") |
| .Items(menu => |
| { |
| menu.Add().Text("Home").Action("Home", "Index", "Home"); |
| menu.Add().Text("About").Action("About", "About", "Home"); |
| }) |
| .Render(); |
| %> |
| </div> |
| </div> |
| <div id="main"> |
| <asp:ContentPlaceHolder ID="MainContent" runat="server" /> |
| <div id="footer"> |
| </div> |
| </div> |
| </div> |
| <!-- other content --> |
| <%= Html.Telerik().ScriptRegistrar() %> |
| </body> |
| </html> |