title: ASP.NET MVC3 : ActionMethod with same name and different arguments for List and Details view
body: <p>I have a ProdcutsController where i have 2 Action methods. Index and Details.
  Index will return list of products and Details will return details of a selected product id.</p>
  
  <p>So my urls are like</p>
  
  <pre><code>sitename/Products/   
  </code></pre>
  
  <p>will load index view to show a list of products.</p>
  
  <pre><code> sitename/Products/Details/1234  
  </code></pre>
  
  <p>will load details view to show the details of product 1234.</p>
  
  <p>Now i want to avoid the "Details" word from my second url. so that it should look like </p>
  
  <pre><code>   sitename/Products/1234 
  </code></pre>
  
  <p>I tried to rename my action method from "Details" to "Index" with a parameter in it. But it showed me the error "<code>Method is is ambiguous</code>"</p>
  
  <p>I tried this</p>
  
  <pre><code> public ActionResult Index()
  {
      //code to load Listing view
  }
  public ActionResult Index(string? id)
  {
      //code to load details view
  }
  </code></pre>
  
  <p>I am getting this error now</p>
  
  <pre><code>The type 'string' must be a non-nullable value type in order to use
  it as parameter 'T' in the generic type or method 'System.Nullable&lt;T&gt;
  </code></pre>
  
  <p>Realized that it does not support method overloading ! How do i handle this ? should i update my route definition ?  </p>