The Exception Class has a protected member for HRESULT . If you derive a class from System.Exception, you can get access to that value. That should contain any 'number' associated to the error (if one was generated). HRESULT has 3 parts to it: a severity code, a facility code, and an error code. There is more detail here: http://msdn2.microsoft.com/en-us/library/system.exception.hresult(VS.71).aspx Example is there. Hope that helps... -Don
hammdo
Posts
-
How to get error number in global.asax -
Export to excel SheetTry this: http://www.codeproject.com/aspnet/Excel_CSV_export_button.asp[^] -Don
-
Getting functions like IsFloat(),IsInteger() in c# ( ASP.NET)One technique you can use is to include the Microsoft.VisualBasic dll and use the 'IsNumeric()' method. Just add a reference to the Microsoft.VisualBasic (assuming .NET 2.0 and assuming you've installed VB.NET) and then you can do this: Microsoft.VisualBasic.Information.IsNumeric("123"); Microsoft.VisualBasic.Information.IsDate("3/21/2007"); There are other available methods so you can review to see if any fit your needs... -Don
-
How to get error number in global.asax -
how to determine Session is Alive or notYou can also use the global.asax and use the session time out method. With that you can redirect the user to a login page or a 'default' page for session timeout information. e.g., // this is inside the global.asax void Session_End(object sender, EventArgs e) { // Code that runs when a session ends. // Note: The Session_End event is raised only when the sessionstate mode // is set to InProc in the Web.config file. If session mode is set to StateServer // or SQLServer, the event is not raised Server.Transfer("login.aspx"); } why Server.Transfer? here is more info on the do's and dont's http://www.developer.com/net/asp/article.php/3299641[^]