Share via


EnumAspNetLifeCycleStage Enumeration

Specifies the ASP.NET life cycle stages in the AspNetLifeCycleStage property of the ErrorEventArgs Class.

Namespace CrystalDecisions.Web Assembly CrystalDecisions.Web (CrystalDecisions.Web.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public NotInheritable Enumeration EnumAspNetLifeCycleStage
    Inherits Enum
    Implements IComparable, IFormattable, IConvertible
[SerializableAttribute]
public sealed enumeration EnumAspNetLifeCycleStage : Enum, IComparable, IFormattable, IConvertible

Members

Member Description
LoadViewStateStage The load ViewState stage in the ASP.NET life cycle. Initialized objects receive ViewState information that has been persisted on the Web server.
OnInitStage The object initialization stage in the ASP.NET life cycle. Objects are declared and initialized.
OnLoadStage The object load stage in the ASP.NET life cycle. Objects are displayed on the page and code is executed.
OnPreRenderStage The prerender stage in the ASP.NET life cycle. Objects can be modified before they are saved or persisted to ViewState.
RaisePostBackEventStage The raise PostBack event stage in the ASP.NET life cycle. Objects are checked whether their data have been changed.
RenderStage The render stage in the ASP.NET life cycle. Objects are rendered in HTML for display to the Web browser.
SaveViewStateStage The save to ViewState stage in the ASP.NET life cycle. Objects that have been modified are saved to ViewState.
UnknownStage An unknown stage in the ASP.NET life cycle.

Example

The following example logs the Error event of the report.

'Declaration

      Private Sub LogErrorEvent(ByVal source As Object, _
        ByVal e As CrystalDecisions.Web.ErrorEventArgs) Handles _
          CrystalReportViewer.Error
        Dim eventLog As New EventLog("event.log")
        Dim eventMsg As String = _
        "Error event:" & vbCrLf & _
        "AspNetLifeCycleException: " & e.AspNetLifeCycleException.Message & vbCrLf & _
        "AspNetLifeCycleStage: " & e.AspNetLifeCycleStage.ToString() & vbCrLf & _
        "ErrorMessage: " & e.ErrorMessage
        eventLog.WriteEntry(eventMsg)
        e.Handled = False
      End Sub
      private void LogErrorEvent(Object source, 
        CrystalDecisions.Web.ErrorEventArgs e)
      {
        System.Diagnostics.EventLog eventLog = 
          new System.Diagnostics.EventLog("event.log");
        string eventMsg = 
          "Error event:" + "\n" +
          "AspNetLifeCycleException: " + e.AspNetLifeCycleException.Message + "\n" +
          "AspNetLifeCycleStage: " + e.AspNetLifeCycleStage.ToString() + "\n" +
          "ErrorMessage: " + e.ErrorMessage + "\n";
        eventLog.WriteEntry(eventMsg);
        e.Handled = false;
      }

Inheritance Hierarchy

Object
   ValueType
      Enum
         EnumAspNetLifeCycleStage

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports .NET XI

See Also

Reference

CrystalDecisions.Web Namespace