Solved

Error following MVC tutorial: The current request for action 'Create' on controller type 'HomeController' is ambiguous between the following action methods:

Posted on 2011-02-15
2
1,791 Views
Last Modified: 2013-12-17
I am having the following error in Create when following the tutorial below:
The current request for action 'Create' on controller type 'HomeController' is ambiguous between the following action methods:
System.Web.Mvc.ActionResult Create(System.Web.Mvc.FormCollection) on type ContactManager.Controllers.HomeController
System.Web.Mvc.ActionResult Create(ContactManager.Models.Contact) on type ContactManager.Controllers.HomeController

http://www.asp.net/mvc/tutorials/iteration-1-create-the-application-cs
0
Comment
Question by:DistillingExperts
2 Comments
 
LVL 16

Accepted Solution

by:
ToddBeaulieu earned 500 total points
ID: 34898837
Hi. You can't have the same action name twice, even though they differ in signatures. MVC doesn't know how to route the request.
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 34899750
Hi DistillingExperts;

Did you place the attribute

    [AcceptVerbs(HttpVerbs.Post)]

above the, POST: /Home/Create, Action method?

Fernando
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question