Visual Basic Concepts
The final step on the Customers page is to dynamically create a hyperlink that returns the user to the Menu page. You use the URLFor method to do this. URLFor is an easy way of indicating that the webclass should move to a different webitem — instead of entering the fully parsed HTTP URL that indicates how to access a webitem, you simply enter the name of the webitem you want to call.
To add a URL to the customer page
Response.Write "</table><br><a href=""" & URLFor(Menu) & _
""">Back to Menu</a></BODY></HTML>"
In this code, the <a href> tag is an ordinary HTML hyperlink, but it points to a webitem in the webclass rather than to a Web site such as http://www.microsoft.com. When the link is selected, the webclass will locate and display the Menu webitem.
You can now run your webclass project to test your application's buttons. You should see the following page when you click the Show All Customers button:
You now have a functional, data-aware webclass. Note that the hyperlinks on the Customers page are not working yet. What remains to be done is to make these links work by creating a Details page to show more information about each row as it's selected.
There are several advanced features of webclasses that you will use in this section. You will: