Manually trigger postback in asp.net

Discussion in 'ASP .Net' started by Terence McGhee, Aug 19, 2004.

  1. Hello. All I want to do is have my web app display a page with an
    animated gif on it. After a certain timespan, I want that page to
    redirect the user to another page. So, in effect, I can display a
    progress bar of sorts. The problem is that timers don't work for this,
    nor do custom events. I'm guessing that if I manually forced a
    postback, I could catch that in the Page_Load method and do the
    redirect there. I'm using c#. Thank you.
     
    Terence McGhee, Aug 19, 2004
    #1
    1. Advertisements

  2. Terence McGhee

    Guest Guest

    have a look at the following.

    <html>
    <head>
    <title>My Redirect</title>
    </head>
    <body>
    This page will redirect to <b>http://www.msdn.microsoft.com</b> in 5
    seconds.
    </body>
    <script language="javascript">
    window.setTimeout("reDirect()",5000);

    function reDirect() {
    window.location.href = "http://www.msdn.microsoft.com";
    }
    </script>
    </html>
     
    Guest, Aug 19, 2004
    #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.