Reputation: 188
Please help me, in my controller I am having 2 action methods with same name called "Index" but with different parameters ..
public ActionResult Index()
{...}
[HttpPost]
public ActionResult Index(PickingMobile mi, string hdnSelectOperation, string btnMPSearch, string btnSearchMP)
{...}
Now from other action I want to redirect to Index action which has no parameters
public ActionResult ConfirmBatchPicking(PickingMobile DirectPicking)
{
...
return RedirectToAction("Index", "ManualPickingSearch");// from here I need to redirect to first Index Method which does not have any parameters
}
But when I keep the break point and debugging the sequence, the first Index method is not getting hit. Please help me , how to redirect to first Index action.
Upvotes: 0
Views: 936
Reputation: 177
And so, when you say return RedirectToAction("Index", "ManualPickingSearch"); it will redirect to first action method by default. Its the default behavior. Its how it should work. Please check if you are missing something.(Check the controller Name)
Upvotes: 1