tags:

views:

72

answers:

0

Hello,

I try to get a link by the method GenerateLink like this

HtmlHelper.GenerateLink(this.ControllerContext.RequestContext, RouteTable.Routes, "My Link", "Default", "Index", "Home", null, null);

This method works very well except when I get the link with a "index" view, she returns a URL like this "http://localhost:61406/Guide" it should be an URL like this: "http://localhost:61406/Guide/Home/Index"

Could someone tell me how I can force this method to send me a correct URL ..

for info here is my Route

   routes.MapRoute(
            "SectionIndex",  // Route name
        "{sectionName}/{controller}/{action}",                                                              // URL with parameters
        new { controller = "News", action = "Index", sectionName = "" }                                     // Parameter defaults
    );

Thank you in advance