Try This
Change the App_Start/RouteConfig.cs
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapMvcAttributeRoutes();//You Can Add Manually
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
then yo can modify Controller
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace WebApplication1.Controllers
{
public class HomeController : Controller
{
// GET: Home
public ActionResult Index()
{
return View();
}
// http://localhost:52603/group1/home/index
[Route("group1/home/index")]
public ActionResult Group1()
{
return View();
}
//http://localhost:52603/group2/home/index
[Route("group2/home/index")]
public ActionResult Group2()
{
return View();
}
}
}