title: How to hide action method in url mvc
body: <p>i'm trying to hide action method name in url but no case. i have this:</p>
  
  <p>RouteConfig:</p>
  
  <pre><code>        routes.MapRoute(
              name: "People",
              url: "People/{id}",
              defaults: new { controller = "People", action = "Index"}
          )
  </code></pre>
  
  <p>PeopleController:</p>
  
  <pre><code>    public ActionResult Index(string id)
      {
          return View(id);
      }
  </code></pre>
  
  <p>And i have to call this method using Url.Action("Index","People",new{id="test"}) or same in the browser put http:www.mysite.com/People/test </p>
  
  <p>no like this: http:www.mysite.com/People/Index/test </p>
  
  <p>Any idea? Thanks</p>
  
  <p>RouteConfig.cs:</p>
  
  <pre><code>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 }
          );
  
  
          routes.MapRoute(
              name: "People",
              url: "People/{id}",
              defaults: new { controller = "People", action = "Index"}
          );
      }
  }
  </code></pre>
  
  <p>}</p>