Reputation: 23
At this url http://localhost:9392/ClubLeague/StartMenu/161?type=ClubLeague I have a button that pops up a modal window with results. The modal window has a submit button that submits data from a DropdownListFor. After the submit button is clicked I wish to return to the same url - http://localhost:9392/ClubLeague/StartMenu/161?type=ClubLeague
however I get redirected to http://localhost:9392/ClubLeague/StartMenu?clubId=161
This is my RedirectToAction - return RedirectToAction("StartMenu", new { clubId });
Upvotes: 2
Views: 80
Reputation: 13146
You should change it;
return RedirectToAction("StartMenu", new { clubId });
to
return RedirectToAction("StartMenu", new { id = clubId,type = "ClubLeague" });
It redirects to user /ClubLeague/StartMenu/161?type=ClubLeague
Upvotes: 1