I have two methods:
public ActionResult Index(int? id)
{
return Redirect("/View/" + this.GetMenuItems().First().Id);
}
public ActionResult Index(int id, uint? limit)
{
when i go to /View/1 – i get that error
he current request for action ‘Index’ on controller type ‘ViewController’ is ambiguous between the following action methods:
System.Web.Mvc.ActionResult Index(System.Nullable1[System.Int32]) on type SVNViewer.Controllers.ViewController1[System.UInt32]) on type SVNViewer.Controllers.ViewController
System.Web.Mvc.ActionResult Index(Int32, System.Nullable
I need that two methods but remove Ambiguous error, how can i do that?
Change your second Action to not have an nullable uint.
Your
Index(int? id)should be the method which handles if limit is null.