Вопрос по asp.net-mvc – Карта сайта HtmlHelper ASP.NET MVC

3

Error: User Rate Limit ExceededHtmlHelper):

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.CompilerServices;
using System.Web.Mvc;
using System.Text;

using System.Web.Routing;

namespace Intranet.Helpers
{
  public static class MenuHelper
  {
    private static string GetBackLink(SiteMapNode parentNode)
    {
      return "<li class='li-back'><a href='" + parentNode.Url + "' title='" + parentNode.Title + "'></a></li>";
    }

    public static string Menu(this HtmlHelper helper)
    {
      var sb = new StringBuilder();
      SiteMapNodeCollection siteMapNodeCollection;
      sb.Append("<ul>");
      SiteMapNode currentNode = SiteMap.CurrentNode;

      if (!SiteMap.CurrentNode.Equals(SiteMap.RootNode))
      {
        if (!SiteMap.CurrentNode.HasChildNodes)
          sb.Append(GetBackLink(SiteMap.CurrentNode.ParentNode.ParentNode));
        else
          sb.Append(GetBackLink(SiteMap.CurrentNode.ParentNode));
      }

      if (!SiteMap.CurrentNode.HasChildNodes)
        siteMapNodeCollection = SiteMap.CurrentNode.ParentNode.ChildNodes;
      else
        siteMapNodeCollection = SiteMap.CurrentNode.ChildNodes;

      foreach (SiteMapNode node in siteMapNodeCollection)
      {
        if(node.Description.Equals("hidden")) continue;

        if (node.Url.Length == 0 && node.Description.Equals("separator"))
          sb.Append("<li class=\"li-separator\"></li>");
        else if (node.Url.Length == 0 && node.Description.Equals("heading"))
          sb.Append("<li class=\"li-heading\">" + node.Title + "</li>");
        else
        {
          if (node.HasChildNodes)
          {
            if (node.NextSibling != null)
              sb.Append("<li class=\"li-sub\"><a href=\"" + node.Url + "\">" + node.Title + "</a></li>");
            else
              sb.Append("<li class=\"li-sub last-child\"><a href=\"" + node.Url + "\">" + node.Title + "</a></li>");
          }
          else
          {
            if (node.NextSibling != null)
              sb.Append("<li><a href='" + node.Url + "'>" + node.Title + "</a></li>");
            else
              sb.Append("<li class='last-child'><a href='" + node.Url + "'>" + node.Title + "</a></li>");
          }
        }
      }

      sb.Append("</ul>");
      return sb.ToString();
    }
  }
}

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded{controller}/{action}Error: User Rate Limit Exceeded

Error: User Rate Limit Exceededhttp://localhost/mycontroller/myactionError: User Rate Limit Exceededhttp://localhost/mycontroller/myaction/50Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Ваш Ответ

4   ответа
0

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded Kezzer
0

Error: User Rate Limit Exceeded

http://localhost/myarea/contract/viewcontract/12

Error: User Rate Limit Exceeded

BaseDV.SetPageMapBasedOnLink(Links.ContractView)

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded Kezzer
5

"Defining sitemap nodes"

...

area | Optional | Area of the specified controller the node should link to

...

Error: User Rate Limit Exceeded Kezzer
11

Error: User Rate Limit Exceededgithub.com/maartenba/MvcSiteMapProvider
Error: User Rate Limit Exceeded Kezzer
Error: User Rate Limit Exceeded Kezzer
Error: User Rate Limit Exceeded Kezzer

Похожие вопросы