On Error redirect

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shank

    On Error redirect

    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


  • Mike Brind [MVP]

    #2
    Re: On Error redirect


    "shank" <shank@tampabay .rr.comwrote in message
    news:e21mI0pGJH A.2580@TK2MSFTN GP05.phx.gbl...
    >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


    Comment

    • shank

      #3
      Re: On Error redirect



      "Mike Brind [MVP]" <paxtonend@hotm ail.comwrote in message
      news:%237VVZkuG JHA.4600@TK2MSF TNGP06.phx.gbl. ..
      >
      "shank" <shank@tampabay .rr.comwrote in message
      news:e21mI0pGJH A.2580@TK2MSFTN GP05.phx.gbl...
      >>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


      Comment

      • Anthony Jones

        #4
        Re: On Error redirect

        "shank" <shank@tampabay .rr.comwrote in message
        news:e21mI0pGJH A.2580@TK2MSFTN GP05.phx.gbl...
        >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.Redire ct. (or try catch if you are using JScript and
        do the redirect in the catch)


        --
        Anthony Jones - MVP ASP/ASP.NET

        Comment

        • Jeff Dillon

          #5
          Re: On Error redirect

          "shank" <shank@tampabay .rr.comwrote in message
          news:ei93BLzGJH A.2156@TK2MSFTN GP05.phx.gbl...
          >
          >
          "Mike Brind [MVP]" <paxtonend@hotm ail.comwrote in message
          news:%237VVZkuG JHA.4600@TK2MSF TNGP06.phx.gbl. ..
          >>
          >"shank" <shank@tampabay .rr.comwrote in message
          >news:e21mI0pGJ HA.2580@TK2MSFT NGP05.phx.gbl.. .
          >>>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



          Comment

          Working...