ASP.NET MVC: RedirectToAction with parameters to POST Action -


this question has been asked here:

redirecttoaction parameter

but if have 2 actions same name different parameters? how redirect post terms action instead of terms action.

public actionresult terms() {     //get method }  [httppost] public actionresult terms(string month, string year, int deposit = 0, int total = 0) {     //process post request } 

nevermind guys, call method directly instead of using redirecttoaction so:

return terms(month, year, deposit, total); 

instead of:

return redirecttoaction("terms", {month, year, deposit, total}); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -