• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1181
  • Last Modified:

in MVC how can i redirect to a jquery dialog and on the click of ok on the dialog redirect to another controller action???

in MVC how can i redirect to a jquery dialog and on the click of ok on the dialog redirect to another controller action???
0
cbrune
Asked:
cbrune
1 Solution
 
BardobraveCommented:
Well...

You cannot redirect your server execution to a jQuery dialog. What you can do is to redirect your execution to a page where, onload (or on any event) a jQuery dialog is open.

Once you have your dialog open, redirecting to a controller action is easy, as you can define functions on dialog button actions.

$("#yourDialogElement").dialog(
    buttons: {
        "yourOkButton": window.location = "/yourController/yourOkAction/yourParams",
        "yourCancelButton": window.location = "/yourController/yourCancelAction"
    }
);
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now