Connecting Tech Pros Worldwide Help | Site Map

On Error redirect

shank
Guest
 
Posts: n/a
#1: Sep 19 '08
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]
Guest
 
Posts: n/a
#2: Sep 20 '08

re: On Error redirect



"shank" <shank@tampabay.rr.comwrote in message
news:e21mI0pGJHA.2580@TK2MSFTNGP05.phx.gbl...
Quote:
>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


shank
Guest
 
Posts: n/a
#3: Sep 20 '08

re: On Error redirect




"Mike Brind [MVP]" <paxtonend@hotmail.comwrote in message
news:%237VVZkuGJHA.4600@TK2MSFTNGP06.phx.gbl...
Quote:
>
"shank" <shank@tampabay.rr.comwrote in message
news:e21mI0pGJHA.2580@TK2MSFTNGP05.phx.gbl...
Quote:
>>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


Anthony Jones
Guest
 
Posts: n/a
#4: Sep 21 '08

re: On Error redirect


"shank" <shank@tampabay.rr.comwrote in message
news:e21mI0pGJHA.2580@TK2MSFTNGP05.phx.gbl...
Quote:
>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

Jeff Dillon
Guest
 
Posts: n/a
#5: Sep 27 '08

re: On Error redirect


"shank" <shank@tampabay.rr.comwrote in message
news:ei93BLzGJHA.2156@TK2MSFTNGP05.phx.gbl...
Quote:
>
>
"Mike Brind [MVP]" <paxtonend@hotmail.comwrote in message
news:%237VVZkuGJHA.4600@TK2MSFTNGP06.phx.gbl...
Quote:
>>
>"shank" <shank@tampabay.rr.comwrote in message
>news:e21mI0pGJHA.2580@TK2MSFTNGP05.phx.gbl...
Quote:
>>>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



Closed Thread