Error Handle

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pentahari
    New Member
    • Dec 2007
    • 60

    Error Handle

    How to handle error using asp.net

    i also use webconfig and global.asax for catch error and redirect to error page. i used the exception in geterror page but how to get the error code.
  • Fuhrer
    New Member
    • Dec 2006
    • 30

    #2
    Originally posted by pentahari
    How to handle error using asp.net

    i also use webconfig and global.asax for catch error and redirect to error page. i used the exception in geterror page but how to get the error code.

    Hi there,
    i think u should try this piece of code(i'm using C# code):
    [code=cpp]
    try
    {
    //here goes your code to test
    }
    catch(Exception ex)
    {
    //ex is a variable that contain the error code and infos,here u can handle ur error
    }[/code]

    Hope this is what ur looking for
    Last edited by Frinavale; Mar 22 '08, 09:47 PM. Reason: Added [code] tags

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Originally posted by pentahari
      How to handle error using asp.net

      i also use webconfig and global.asax for catch error and redirect to error page. i used the exception in geterror page but how to get the error code.
      I'm not sure what you're having problems with. You seem to know how to catch errors seeing as you know about the OnError in the Global.asax and how to use the web.config...wh at exactly are you asking for help with?

      -Frinny

      Comment

      Working...