On Error redirect

Discussion in 'ASP General' started by shank, Sep 19, 2008.

  1. shank

    shank Guest

    I have a page that will timeout and crash with a timeout error on line 200.

    How can I do a redirect instead of the page halting if such an error does
    happen?

    thanks
     
    shank, Sep 19, 2008
    #1
    1. Advertising

  2. "shank" <> wrote in message
    news:...
    >I have a page that will timeout and crash with a timeout error on line 200.
    >
    > How can I do a redirect instead of the page halting if such an error does
    > happen?
    >
    > thanks


    Wouldn't it be preferable to resolve the cause of the error - therefore
    preventing it in the first place?

    --
    Mike Brind
    MVP - ASP/ASP.NET
     
    Mike Brind [MVP], Sep 20, 2008
    #2
    1. Advertising

  3. shank

    shank Guest

    "Mike Brind [MVP]" <> wrote in message
    news:%...
    >
    > "shank" <> wrote in message
    > news:...
    >>I have a page that will timeout and crash with a timeout error on line
    >>200.
    >>
    >> How can I do a redirect instead of the page halting if such an error does
    >> happen?
    >>
    >> thanks

    >
    > Wouldn't it be preferable to resolve the cause of the error - therefore
    > preventing it in the first place?
    >
    > --
    > Mike Brind
    > MVP - ASP/ASP.NET

    =============================
    I know what the problem is and cannot fix. I need to change the timeout spec
    on a shared SQL server and the admin refuses to change because in fact it's
    shared. So, the option is to refresh the page manually every couple minutes
    or find a way to automate that refresh. It's an admin page and I'm the only
    one acessing it.
    thanks
     
    shank, Sep 20, 2008
    #3
  4. "shank" <> wrote in message
    news:...
    >I have a page that will timeout and crash with a timeout error on line 200.
    >
    > How can I do a redirect instead of the page halting if such an error does
    > happen?
    >


    You could use an On Error Resume Next and test Err.Number after line 200,
    if non-zero Response.Redirect. (or try catch if you are using JScript and
    do the redirect in the catch)


    --
    Anthony Jones - MVP ASP/ASP.NET
     
    Anthony Jones, Sep 21, 2008
    #4
  5. shank

    Jeff Dillon Guest

    "shank" <> wrote in message
    news:...
    >
    >
    > "Mike Brind [MVP]" <> wrote in message
    > news:%...
    >>
    >> "shank" <> wrote in message
    >> news:...
    >>>I have a page that will timeout and crash with a timeout error on line
    >>>200.
    >>>
    >>> How can I do a redirect instead of the page halting if such an error
    >>> does happen?
    >>>
    >>> thanks

    >>
    >> Wouldn't it be preferable to resolve the cause of the error - therefore
    >> preventing it in the first place?
    >>
    >> --
    >> Mike Brind
    >> MVP - ASP/ASP.NET

    > =============================
    > I know what the problem is and cannot fix. I need to change the timeout
    > spec on a shared SQL server and the admin refuses to change because in
    > fact it's shared. So, the option is to refresh the page manually every
    > couple minutes or find a way to automate that refresh. It's an admin page
    > and I'm the only one acessing it.
    > thanks
    >

    Then fix your query. Or start a SQL job and immediately exit
     
    Jeff Dillon, Sep 27, 2008
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VHJveQ==?=

    Response.redirect does not redirect from .aspx page

    =?Utf-8?B?VHJveQ==?=, Oct 18, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    5,260
    Srowe1975
    Oct 15, 2008
  2. =?Utf-8?B?UnVkeQ==?=

    Re: Newbie ? - Error on Redirect from login page error

    =?Utf-8?B?UnVkeQ==?=, Dec 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    365
    =?Utf-8?B?UnVkeQ==?=
    Dec 15, 2004
  3. Replies:
    3
    Views:
    990
    HalcyonWild
    Oct 14, 2005
  4. Sal
    Replies:
    1
    Views:
    545
  5. Ron Howard
    Replies:
    2
    Views:
    528
    Ron Howard
    Aug 11, 2004
Loading...

Share This Page