title: Ambuiguity in calling action method in mvc
body: <p>I was creating a sample mvc application and created two action methods (Index) in the Home controller.</p>
  
  <pre><code>public class HomeController : Controller
  {
      //
      // GET: /Home/        
      public string Index()
      {
          return Index1();
      }
  
      public string Index(string message)
      {
          return "hello";
      }
  }
  </code></pre>
  
  <p>And the index is set as the default action in running the application. On running the application I get the below error,</p>
  
  <blockquote>
    <p>The current request for action 'Index' on controller type
    'HomeController' is ambiguous between the following action methods:
    System.String Index(Int32) on type
    Mvc4example.Controllers.HomeController System.String
    Index(System.String) on type Mvc4example.Controllers.HomeController</p>
  </blockquote>
  
  <p>What I expected is that with out query string it'll invoke the parameterless action method and if there is a query string message is passed then the action method with parameter will get invoked.</p>
  
  <p>Can anyone explain why this behavior?</p>