I'm struggling with renderaction, the problem is that it calls the wrong action method on my controller.
On my "Users" controller there are two action methods called edit, one for get and one for post requests:
public virtual ActionResult Edit(int id)
{
//return a view for editing the user
}
[AcceptVerbs(HttpVerbs.Post)]
public virtual ActionResult Edit(UserViewModel model)
{
//modify the user...
}
In my view, I'm calling Renderaction it as follows:
Html.RenderAction("Edit", "Users", new { id = 666});
Now the problem is that I want the GET action method to be rendered. However (perhaps because the model also contains a property called ID?), Renderaction calls my POST action method instead.
What's the proper way to do this? I'm using ASP.NET MVC 3 RC in case it matters.
Thanks,
Adrian