Visual Basic Concepts

Webclass Events

Every webitem in the webclass contains a series of events. There are three kinds of webclass events: standard events, template events, and custom events. The following table summarizes the main differences between these three events.

Event Originates Appears Applies to Example
Standard event Predefined. Only in the Code Editor window's Procedure list. Templates and custom webitems. Respond, ProcessTag
Template event Event candidates are generated by Visual Basic when it parses an HTML template file. In the Designer window, and in the Code Editor window after connecting. Templates. Img1 SRC, Form1
Custom event Added by the developer. In the Designer window and in the Code Editor window. Custom webitems or templates. VerifyUser, DisplayChart

The end user of an IIS application initiates the process that fires an event by clicking on an element in the browser — for example, a hyperlink — that makes a request to the server. The webclass intercepts this request and takes one of the following actions:

  • If an event is specified in the request, the webclass fires the Visual Basic event by matching the request up to the appropriate webitem and event procedure.

  • If the event specified in the request does not correspond to any existing webclass event, the webclass fires the UserEvent event for the template.

  • If there is no event specified in the request, the webclass fires the Respond event for the template.

  • If no webitem or event is specified in the request, the system launches the ASP for the application and fires the webclass's Start event.

For More Information   See "Responding to Events in IIS Applications" for more information on writing code to process your events.