title: "The parameters dictionary contains a null entry for parameter" - How to fix?
body: <p>I am trying to implement an edit page in order administrator to modify data in database.Unfortunately I am encountering an error. </p>
  
  <p>The code below:</p>
  
  <pre><code>public ViewResult Edit(int productId) {
         // Do something here 
  }
  </code></pre>
  
  <p>but I am getting this error: </p>
  
  <pre><code>"The parameters dictionary contains a null entry for parameter 'productId' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ViewResult Edit(Int32)' in 'WebUI.Controllers.AdminController'. To make a parameter optional its type should be either a reference type or a Nullable type.
  Parameter name: parameters"
  </code></pre>
  
  <p>I changed my route in <code>Global.asax.cs</code> like this: </p>
  
  <pre><code> routes.MapRoute(
  "Admin",
  "Admin/{action}/{ productId}",
  new { controller = "Admin", action = "Edit",  productId= "" }
  );
  </code></pre>
  
  <p>but still I am getting the error .</p>