javascript - How to redirect to a specific action in mvc 4 controller -
i have 2 forms in page 1 search bar , other 1 registration form, problem after registration, when page submitted, instead of posting action of registration form, posts search bar action method.
now thinking because of 2 forms having misnomer, removed search bar form , implemented using javascript. solved problem letting registration form post correct action method, problem registration forms action method redirects search bar action method after has finished processing page, when suppose deliver registration complete page.
so question how can prevent registration action method redirecting search bar action method.
use this. specify action , controller want.
return redirecttoaction("action", "controller");
Comments
Post a Comment