Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8437881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:33:20+00:00 2026-06-10T07:33:20+00:00

I am following this book Pro.ASP.NET.MVC.3.Framework from Adam Freeman. So I download the code

  • 0

I am following this book Pro.ASP.NET.MVC.3.Framework from Adam Freeman.
So I download the code and is generating this html code in his menu categories.

The html:

<a class="" href="/Chess%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20">Chess                                             </a>

The result when I press the link (obvious):

http://localhost:43190/Chess%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20

I don’t know somebody has this issue with this book.

I try in my global.asax:

 routes.IgnoreRoute("favicon.ico");
            routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });

In my layout:

 <link rel="shortcut icon" href="@Url.Content( "~/Content/themes/base/images/favicon.ico" )" type="image/x-icon" />

And in my ninject controller:

  protected override IController GetControllerInstance(System.Web.Routing.RequestContext requestContext, Type controllerType)
        {

            if (controllerType != null)
            {
                return (IController)ninjectKernel.Get(controllerType);
            }
            else
            {
                return base.GetControllerInstance(requestContext, controllerType);
            }

        }

I don’t know if someone have the same issue as me. How can I solve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:33:22+00:00Added an answer on June 10, 2026 at 7:33 am

    Edited:
    the real answer
    ok I Understood know my sql was nvarchar so it generated blank space, i change to varchar and know not generate the blanck spaces

    I read somewhere that adding .trim() it will do it and yes it work i dont understand why it put this (%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20)

    change this “category = link,” for this
    “category = link.Trim(),”

    the Menu.chtml

    @model IEnumerable<string>
        @{
            Layout = null;
        }
        @Html.ActionLink("Home", "List", "Product")
        @foreach (var link in Model)
        {
            @Html.RouteLink(link, new {
        controller = "Product",
        action = "List",
        category = link.Trim(),
        page = 1
        }, new {@class = link == ViewBag.SelectedCategory ? "selected": null}
        )
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was following Steven Sanderson's ' Pro ASP.NET MVC Framework ' book. On page
Working through Pro ASP.NET MVC book and I got the following code snippet that
I am trying to following book : Pro ASP.NET MVC Framework by Steven Sanderson
I'm following the book Pro ASP.Net MVC2 and I can't move past this point.
I am currently using Steven Sanderson book Pro ASP.NET MVC 2 Framework. But I
I'm following the sportsStore tutorial from the Apress Pro Mvc 2 Framework book. It's
I've been reading and following the book Pro ASP.Net MVC3 Framework Third Edition by
I have the following piece of code from a book. There is this function
I'm following Pro ASP.Net MVC2 book and literally 90% of everything is new to
I am new to MVC and I have been following Steven Andersons Pro ASP.Net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.