1
I’m building a website. But there’s one issue I can’t resolve. I have a Home Controller, where I have all the Views of the site. For example, I enter and when I click one of the images to go to another View, , my URL does not appear as I wanted. I wanted it to appear ->
Excerpt from View Football Turf Code:
<div class="gallery">
<a href="/Home/DOMOSlide">
<img src="~/Imagens/Slide DS.jpg" alt="DOMO Slide DS">
</a>
<div class="desc">DOMO® Slide DS</div>
</div>
It will have to be on Route.config?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace SiteTESTE
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}
Miguel, put the images of the question itself, it is easier to view. Second, put your code, in particular the definition of the routes in
global.asax.cs
and an example ofactions
home, asRelvaFutebol
– Ricardo Pontual
I have updated my question. global.asax.Cs has not changed since the beginning of the project.
– miguel carreira
In your project you must have a folder
App_Start
and inside a fileRouteConfig.cs
, if possible, add it to the question,– Barbetta
I’ve already added Route.config code
– miguel carreira