One Step Further: Setting the Web Site Title in Internet Explorer
Haven't had enough yet? Here's one last Web programming tip to enhance your Web site and send you off on your own explorations.
You might have noticed while testing the Car Loan Calculator Web site that Internet Explorer displayed “Untitled Page” in the title bar when displaying your Web site. In other words, your screen looked like this:
You can customize what Internet Explorer and other browsers display in the title bar by setting the Title property of the Document object for your Web page. Give it a try now.
Set the Title property
With the Default.aspx Web page open in Design mode, click the Document object in Object list box of the Properties window.
Each Web page in a Web site contains a Document object that holds important general settings for the Web page. However, the Document object is not selected by default in the Designer, so you might not have noticed it. One of the important properties for the Document object is Title, which sets the title of the current Web page in the browser.
Set the Title property to “Car Loan Calculator”.
The change does not appear on the screen, but Visual Web Developer records it internally.
Click the Start Debugging button.
Visual Studio opens Internet Explorer and loads the Web site. Now a more useful title bar appears, as shown in the following illustration:
Now that looks better.
Close Internet Explorer, and update the Title properties for the other Web pages in your Web site.
When you're finished experimenting with the Car Loan Calculator, save your changes, and close Visual Studio.
Congratulations on completing the entire Microsoft Visual Basic 2005 Step by Step programming course! Take a few moments to flip back through this book and see all that you have learned. Now you're ready for more sophisticated Visual Basic challenges and programming techniques. Check out the resource list in Appendix A, “Where to Go For More Information,” for a few ideas about continuing your learning. But take a break first—you've earned it!