Catch Exception Error Message

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Francisco Fagas

    #1

    Catch Exception Error Message

    Hi, you can put your code between:
    try{
    }catch(Exceptio n ex){;}
    in codebehind and your html code:
    response.write( ex.Message)
    the last code is in c#, remember that C# is Key sensitive.

    [color=blue]
    >-----Original Message-----
    >Is there any way to output an error directly to the HTML[/color]
    in a ASP.NET page[color=blue]
    >when an exception is caught?
    >
    >
    >.
    >[/color]
Working...