BACK BUTTON AND WINDOW.OPEN ISSUE!!!!

Discussion in 'ASP .Net' started by javs1983, Apr 2, 2008.

  1. javs1983

    javs1983 Guest

    Hello,

    Here's my situation... I have an ASP.NET 2.0 (C#) page with a link
    button.
    When a user clicks the button I need it to execute the code behind
    code for
    the link button on click event. At the end of the code behind code for
    the
    link button click event, I use JavaScript to popup another browser
    window
    (using window.open).

    This all works fine. It's basically a confirmation popup.

    The issue comes in when the user closes the popup and continues to
    work with
    the site and they click the back button. If they click the back button
    to
    the correct place, the popup window appears again, which I don't want.
    I
    only want to popup to appear if the user clicks the link button on the
    page
    in question, not by using the back button.

    So, would anyone know how to prevent the popup window from "popping
    up" when
    the user uses the back button?

    Thanks.
     
    javs1983, Apr 2, 2008
    #1
    1. Advertisements

  2. Since .NET pages post back to themselves you can check to see if
    history(0) = current page and determine to show the popup should that
    be true or something similar. You could also get into using an AJAX
    control with the modal popup so its all server side.

    Not necessarily the best solutions but I figured there needed to be at
    least one attempt.
     
    cfps.Christian, Apr 2, 2008
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.