I'm building a website. But there is one question that I can not solve. I have a Home Controller where I have all the Site Views. For example, I enter andwhenIclickononeoftheimagestogotoanotherView,, my URL does not appear as I wanted. I wanted it to appear - >
FootballGrassrootsViewCodeExcerpt:
<divclass="gallery">
<a href="/Home/DOMOSlide">
<img src="~/Imagens/Slide DS.jpg" alt="DOMO Slide DS">
</a>
<div class="desc">DOMO® Slide DS</div>
</div>
Does it 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 }
);
}
}
}