很奇怪的问题,麻烦大家帮我看看。谢谢
Partial Class test
    Inherits System.Web.UI.Page    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim a As Integer, b As Integer, c As Integer
        Try
            a = 4
            b = 1
            c = a / b
            Response.Redirect("this.html")
        Catch ex As Exception
            Response.Redirect("that.html")
        End Try
    End Sub
End Class总是跳转到that.html
如果把两句response.redirect换成response.write就没问题。

解决方案 »

  1.   

     Response.Redirect("this.html") 的效果就是跳转到that.html 
      

  2.   

    你的代码是不管正确与否都是跳转到this.html页面的。
      

  3.   

     Response.Redirect("this.html",false
    要加上个false,这里有解释:
    http://topic.csdn.net/u/20080909/10/fa572c74-5f5b-4996-a649-36691fcfadcb.html
      

  4.   

    VB中的catch是放在try里面的吗?VB不懂,觉得怪怪的啊  try
       { 
         //statement
       }
       catch (Exception e)
       {
         // throw e
       }
      

  5.   

    你的代码是不管正确与否都是跳转到this.html页面的。
      

  6.   

    A和B都是定值,C直接等于4,怎么可能出错跳到CATCH