title: How to create a MVC Route only with a paramter in URL
body: <p>How to create a route with only a single parameter?</p>
  
  <p>Example: A want to call </p>
  
  <blockquote>
    <p>//URL: <code>localhost:43760/NameMyProduct</code></p>
  </blockquote>
  
  <p>My route is:</p>
  
  <pre><code>routes.MapRoute(
                 name: "RouteEvent",
                 url: "{productName}",
                 defaults: new { controller = "Product", action = "Details", ProductName= UrlParameter.Optional }
             );
  </code></pre>
  
  <p>However, this mode does not works and my return is 404.</p>
  
  <p>My View Is:<br>
  //HomeController  </p>
  
  <pre><code>[Route("/{productName}")]
  public ActionResult Index(string productName)
  {
      return View();
  }
  </code></pre>
  
  <p>or (I'am trying also)<br>
  //ProductController   </p>
  
  <pre><code>[Route("/{productName}")]
      public ActionResult Details(string productName)
      {
          return View("Details", productName);
      }
  </code></pre>