Exemple #1
0
 public static IHtmlString NavMenu(this HtmlHelper html,UrlHelper url)
 {
     var menuBuilder = new MainMenuProvider();
     var request = html.ViewContext.HttpContext.Request;
     var menuText = menuBuilder.GenerateHtml(request.RawUrl, Path.GetFileName(request.FilePath),url.Content);
     return new MvcHtmlString(menuText);
 }
Exemple #2
0
        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            var menuBuilder = new MainMenuProvider();
            var request = this.Context.Request;
            var menuText = menuBuilder.GenerateHtml(request.RawUrl, Path.GetFileName(request.FilePath),Page.ResolveClientUrl);

            writer.Write(menuText);
        }