Manually Adding Event Notation to an .HTM File

See Also

When Visual Basic saves the .htm file for a webclass template, it makes changes to it. For each tag attribute you connect to an event or a webitem, Visual Basic replaces a portion of the element's HTML with notation unique to the webclass. This allows the webclass to access the HTML page and determine the webitem and event that should be fired when the user selects the element. You can modify the .htm file manually to include this notation if you want to connect events without using the designer.

Note   You do not have to perform the process described in the sections below if you are connecting events from within the Webclass Designer; the designer automatically modifies the HTML file.

Manual Notation to Connect an Attribute to an Event

If you want to manually modify an .htm file to include a reference to a webitem and event, you use different notation than what Visual Basic includes automatically. For example, suppose you have an HTML template file that contains the following code:

<form method=post>

If you want to manually hook up this tag to an event, you could modify the HTML as follows:

<form action=www.myserver.com/Project1_MyWebclass.asp?WCI=webitem1 _
?WCE=eventname method=post>

This notation indicates that the form tag should activate the webitem called "webitem1" and launch its FormSubmit event. The notation contains the following parts:

Manual Notation to Connect an Attribute to a WebItem

When you connect an attribute to a webitem instead of an event, you do not use the WCE=Eventname syntax in your .htm file. Instead, you would use the WCI=Webitemname argument only, as shown in the following code:

<form action=www.myserver.com/Project1_MyWebclass.asp?WCI=webitem1 method=post>

This notation indicates that the form tag should activate the webitem called "webitem1" and launch its default event. The notation contains the following parts:

For More Information   See "Connecting Events in a Webclass" for more information on connecting attributes to events and webitems.