1

In my asp.net application, I will redirect to details.aspx page, which contains OK button. when "ok" button is clicked , i opens a Modal pop up extendar which contains submit and cancel button. On submit button click i am storing data in database on server side coding , after saving data i want to redirect the page into some other page say "Report.aspx". This i do as below,

$("[id$=btnQuerySubmit]").bind("click",function () {
    window.location.href = "../web/Report.aspx";
});

But the above code closes Modal window, and remains in same details.aspx page. Not redirecting to Report.aspx page. I have tried below code as well,

window.open('../web/Report.aspx'); This redirects to report.aspx, but page opens in new tab. if i provide _self or _top there is no redirection is performed even in new tab.

I cannot use code behind , have to use Jquery as i need to check which browser is using by the user as below,

$(document).ready(function ($) {
    "use strict";
    // Detecting IE
    var oldIE;
    var a_href;
    if ($('html').is('.ie6, .ie7, .ie8, .ie9')) {
        oldIE = true;
    }
    if (oldIE) {        
        a_href = '../web/Report.aspx';
    } else {       
        a_href = '../web/#/user/Report';
    }
}(jQuery));

Any informations are most welcome.

Thanks in advance

sangeetha

0

1 Answer 1

1

I think your model form gets closed before reaching window.location.href

Try changing your function like this.

 $("[id$=btnQuerySubmit]").bind("click",function (event) {
        event.preventDefault();
        window.location.href = "../web/Report.aspx";
     });
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.