Export (0) Print
Expand All

WebClass event is not supported 

Certain events in Visual Basic 6.0 WebClass projects either are not supported in ASP.NET Web Application projects or are supported differently. Typical examples of such events include BeginRequest, EndRequest, and FatalErrorResponse. These event procedures will be upgraded to your ASP .NET Web Application project, but the code will never be invoked at run time.

What to do next

  1. Move any code in the Initialize, BeginRequest, EndRequest, and Terminate events to the PreRender, PageInit, Load, or UnLoad events as appropriate.

  2. Any code that deals with state management (typically in the Initialize and Terminate events) will need to be replaced. For more information, see Saving ASP.NET Page Values (Visual Studio).

  3. The FatalErrorResponse event has been replaced by structured error handling in ASP.NET.

    1. Add a Try...Catch block for any calls to ProcessEvents or WriteTemplate and call in the Catch block.

    2. Pass the System.Exception object from the Try...Catch block into the FatalErrorResponse code.

    3. Modify the FatalErrorResponse code to use the System.Exception object instead of the Visual Basic 6.0 WebClassError object.

See Also

Community Additions

Show:
© 2014 Microsoft