I'm developing portal in MVC 3. Have controller (MyController
) with three methods Add
(get and post verssion) and Index
and part of add method looks like:
[HttpPost]
public virtual RedirectToRouteResult AddItem(Item item)
{
(...)
return RedirectToAction("Index");
}
Simple? Not fot me:) Item is added properly and when redirecting comes url looks like:
MyController/Index
and not:
mySite/MyController/Index
and of course that is bad news. This situation happens only in one case in one place in the whole portal. What's wrong?