HI,
I keep getting this error -
"Object reference not set to an instance of an object"
Does anyone know how to trap the exact error location, or at least get a more informative error message?
Here is an example of my code where the error seems to be happening but everything looks okay to me
VB Code:
Private Sub cmdSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSubmit.Click Dim sMsg As String = "" Try If LCase(txtEdit.Text) = "true" Then Response.Redirect("complete.aspx?display=pro_edit") End If Catch ex As Exception ' Record any exceptions and exit sMsg = "The following exception occurred: Submit<br />" + ex.Message.ToString End Try If sMsg <> "" Then Message.Visible = True Message.Text = sMsg.ToString End If End Sub
Cheers Al




Reply With Quote