How do I do a try catch for web form?

Hi, I do this all the time for windows forms, and I put this code into the code behind for web forms and I get no errors, but it doesnt work, is there a way to do a try catch for asp.net web forms?  I use vb.net code behind, thanks!

Try
Cmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox("Error: " & ex.message)
End Try
0
joeybagadonutz
12/17/2003 8:25:02 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

1 Replies
489 Views

Similar Articles

[PageSpeed] 41
Get it on Google Play
Get it on Apple App Store

You cant use MsgBox in ASP.NET.. thats a winform thingy..   Use javascript alert() instead.

0
Sharbel_
12/17/2003 8:36:56 PM
Reply: