Partager via


Visual Basic Concepts

Step Four: Add a Custom WebItem

Take a look at the Menu page as it is displayed in the browser. When either button is clicked, the webclass needs to fire an event, retrieve records, and display a new page.

To make the Show All Customers button work, you will create a custom webitem and pass processing to it when the button is clicked. In some ways, a custom webitem is not unlike a code module or a function — it helps organize your code and can contain procedures that are used in multiple locations.

To add a custom webitem to the project

  1. In the webclass designer, click the Add Custom WebItem toolbar icon. "WebItem1" appears beneath the Custom WebItems folder in the left panel of the designer.

  2. Change the name of WebItem1 to ShowIDs. Your screen should now look like this: