|
-
Jul 4th, 2003, 04:59 PM
#1
Thread Starter
Fanatic Member
try catch
Hi,
In my asp.net web appliaction using vb.net I am using a class file.
In the class file there is database activity and I would like to place error handling in this class file.
The question is that If I place the error handling in the class file, then how can the .aspx page show that error?
i.e. I can place the try catch ex as exception in the class file but how will the .aspx page know what the error is so that the lblError control is updated.
for example in vb 6 I used to use err.raise but how is this done in vb.net?
Thanks
-
Jul 4th, 2003, 05:15 PM
#2
dunno if this will help: are you talking about the Throw method?
btw do you know that there is a asp.net forum? http://www.vbforums.com/forumdisplay.php?forumid=31
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Jul 7th, 2003, 08:47 AM
#3
Also
Response.Write(exceptionvariable.ToString())
-
Jul 7th, 2003, 03:49 PM
#4
Frenzied Member
I think i might know what you want to do. You should create your own class that you can return with either success or failure, and a text message.
Something like:
VB Code:
Public Class MyReturnValue
Public Success As Boolean = True
Public Message As String = ""
End Class
~Peter

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|