Hi, I ran across an interesting dilema in a try.. catch.. block that uses "response.Redirect()" Can someone explain why the code below always goes to "www.asp.net"? It does this regardless of the value of intNumber. Am I not fully understanding something, I
would have thought it would go to "www.microsoft.com"?
<script runat="server">
Sub Page_Load
Dim intNumber As Integer
intNumber = 0
Try
If intNumber <> 0 Then
Response.Redirect( "http://www.sqlteam.com" )
Else
Response.Redirect( "http://www.microsoft.com" )
End If
Catch
Response.Redirect( "http://www.asp.net" )
Finally
Response.Write( " Finally!" )
End Try
End Sub
</script>
:) JB
John Belthoff
Dodge, Duck, Dip, Dive & Dodge
If a man can dodge a wrench, he can dodge a ball!
JBelthoff
Member
553 Points
135 Posts
Can some explain?
Jul 30, 2003 03:54 PM|LINK
<script runat="server"> Sub Page_Load Dim intNumber As Integer intNumber = 0 Try If intNumber <> 0 Then Response.Redirect( "http://www.sqlteam.com" ) Else Response.Redirect( "http://www.microsoft.com" ) End If Catch Response.Redirect( "http://www.asp.net" ) Finally Response.Write( " Finally!" ) End Try End Sub </script>:) JBDodge, Duck, Dip, Dive & Dodge
If a man can dodge a wrench, he can dodge a ball!