title: mvc url.action returning null or url as get
body: <p>I am using mvc Url.Action as this </p>
  
  <pre><code>&lt;a href="@Url.Action("Index", "Product", new { area = "Product", search = UrlParameter.Optional, categoryId = category.IdCategory })"&gt;
  </code></pre>
  
  <p>I have my routing as:-</p>
  
  <pre><code>public override void RegisterArea(AreaRegistrationContext context)
  {
      context.MapRoute(
          "Product_default",
          "Product/{controller}/{action}/{id}/{categoryId}",
          defaults: new { controller = "Product", action = "Index", search = UrlParameter.Optional, categoryId = @"\d+" },
          namespaces: new[] { "IBuyFrontEnd.Areas.Product.Controllers" }
      );
  
  }
  </code></pre>
  
  <p>I cannot get the url to map to this route. I am getting it as </p>
  
  <p>However if i change the action to </p>
  
  <pre><code>@Url.Action("Index", "Product")
  </code></pre>
  
  <p>I get this as Url </p>
  
  <pre><code>http://localhost/iteric/?action=Index&amp;controller=Product
  </code></pre>
  
  <p>I cannot figure the why so of this behavior. Just started using .net mvc. Please help me with this. </p>