ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
redirect to another page when closing popupform
Title:
B
I
{code}
?
I have a create popup made using `PopupForm` helper, I would like to redirect to another page when I click the Ok button, the decision to redirect should be made in the Create Post action after Ok button was clicked How can I do this?
Save Changes
Cancel
dear
asked at 13 Dec 2016
Answers
B
I
{code}
?
have a look at this demo http://demo.aspnetawesome.com/PopupFormDemo#PopupForm-with-Success-function-assigned, instead of `alert` you need a js redirect to another page so in the Create post action you would have something like this: if(condition) return Json(new { url = 'redirecturl'}); and in the js success func function created(result) { if(result.url) window.location.href = result.url; }
Save Changes
Cancel
Omu
answered at 13 Dec 2016
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK