为什么我会收到此错误
The current request for action 'Index' on controller type 'MyController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult Index() on type MyProj.Controllers.MyController
System.Web.Mvc.ActionResult Index(MyProj.Models.MyModel) on type MyProj.Controllers.MyController
控制器类:
public class MyController : Controller
{
//
// GET: //
public ActionResult Index()
{
return View();
}
public ActionResult Index(MyModel model)
{
string x = "Hello "+ model.name;
return View();
}
}
}