.net mvc + jquery.confirm

57 Views Asked by At

i'm using .net MVC with jquery.confirm and i have some problem:

i want to show a dialog such as Login Dialog, it's easy to do like this:

        $.dialog({
        title: 'Login',
        content: 'url:/Account/Login'
    });

this is a good way for me because i can also visit "myweb/Account/Login" to access Login page and it's easy to write or debug codes.

but when i close the dialog by click the "X" button, this page lose response, i'm thinking it's because when the dialog try to get url "/Account/Login", it cause server redirecting.

i have to do like this:

        $.confirm({
        title: 'Login',
        content: 'url:/Account/Login',
        onClose: function () {
            //window.location.href = '@Url.Action("Index")';
            //this can solve my problem but i don't want to do like this,because it cause some data missing of Index page.
        }
    });

Anyone who can helps me? Thank a lot!!!

0

There are 0 best solutions below