Workshop


Quiz

1.

What does WYSIWYG stand for?

2.

Is the following HTML properly nested?

<html><body> <h1>My First Web Page</h1> These are a few of my favorite <i>things: <ol>   <li>Jisun</li>   <li>ASP.NET</li>   <li>Basketball</li> </ol></i> </body></html> 


3.

What does the @Page directive do? Does it get rendered to the browser?

4.

What is the name of the event handler you would use to have code execute each time the ASP.NET web page is loaded?

5.

How can you add a Web control to an ASP.NET web page?

Answers

1.

What You See Is What You Get.

2.

Yes. There are no tags whose start tag appears after another tag's start tag (call that tag t), but whose end tag appears after t's end tag.

3.

The @Page directive supplies additional information to the ASP.NET engine, such as the server-side source code language used for the page and the location of the corresponding source code file. It is not rendered to the requesting browser.

4.

The Page_Load event handler. Refer to Listing 2.4 to see an example of this event handler in the source code portion.

5.

There are two ways. First, you can simply drag and drop the appropriate Web control from the Toolbox onto the designer. Second, you can enter the Web control syntax manually in the Source tab.

Exercises

The aim of these exercises is to help familiarize yourself with the Visual Web Developer editor.

  1. The ASP.NET web page we created in the "Creating the HTML Portion of an ASP.NET Web Page Using Visual Web Developer" section contained an HTML <table> tag that was added by going to the Layout menu and selecting the Insert Table option. Once an HTML <table> has been added to a web page, you can easily set the table's various display properties.

    For this exercise, open up Default.aspx in the Design view and alter the <table> element's settings. If you click on the HTML table so that it is highlighted, you will find that its properties are displayed in the Properties window. (You can also select the <TABLE> element from the drop-down list in the Properties window.) For this exercise, set the border property to 3 and the CellPadding property to 5. Also, try setting the BgColor property. Notice that when you select this property from the Properties window, you can choose from an array of colors. You are invited to try setting the various HTML table properties to view their effect to the table in the designer.

  2. For this exercise, add a message to the top of the Default.aspx web page that reads: "Here Are Some Popular Search Engines." This text should be centered, appear above the message that displays the current time, and be displayed in a bold, Arial font.

To accomplish this, start by positioning the cursor in the designer immediately before the Label Web control. Press Enter a few times to create some space. Then type in the text Here Are Some Popular Search Engines. After you have entered this text, select it with the mouse. Then choose the Arial font from the font drop-down list near the upper-left corner. Next, make the text bold by going to the Format menu and selecting Bold. Finally, center the text by going to the Format menu's Justify submenu and choosing the Center option.

As with exercise 1, you are encouraged to experiment with Visual Web Developer's formatting capabilities. See how the text looks with different fonts and formats. Note that you can add bulleted lists, numbered lists, and so on.




Sams Teach Yourself ASP. NET 2.0 in 24 Hours, Complete Starter Kit
Sams Teach Yourself ASP.NET 2.0 in 24 Hours, Complete Starter Kit
ISBN: 0672327384
EAN: 2147483647
Year: 2004
Pages: 233

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net