0

I'm using VS2010 and ASP.NET MVC 4 for my project. I need a controller that should get 2 parameters.

this is my controller method:

[AcceptVerbs(HttpVerbs.Get)]
public ActionResult AcceptBid(int? Id, int? Accept)
{
    if (Id != null && Accept != null)
    {
          //my code...
    }
}

and I created action link like this:

@Html.ActionLink("Accept", "AccpetBid", "Project", new { area = "Service", Id = item.ProjectId, Accept = item.Id }, null)

When I clicked on this link, controller not working and this error thrown:

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Note that other controller methods in this controller class are working.

2
  • I think we need to see your route config Commented Dec 9, 2012 at 14:33
  • If you hover over the link, what address do you see? Commented Dec 9, 2012 at 14:36

1 Answer 1

1

The action name is 'AcceptBid' but your link are trying to access 'AccpetBid'.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, my big mistake! :-) Thanks muriloKunze

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.