Testing the Page


Finally it s time to see the results of all your efforts. Press F5 to run the page. You ll see a listing similar to the one in Figure 11-3.

click to expand
Figure 11-3: The guestbook displayed using a DataList control.

In the browser, right-click the page and choose View Source. If you look closely at HTML of the page, you ll see that the DataList control has been rendered as an HTML table. Each data item appears in its own table row (<tr> element). The layout you created in the template editor is echoed in the contents of a table cell (<td> element). The Label controls are gone they ve been replaced with <span> tags whose contents come from the data in the Guestbook table.

Now that you ve got your page working, you can go back and make some small changes that will enhance the display and that will introduce you to more features of the DataList control.




Microsoft ASP. NET Web Matrix Starter Kit
Microsoft ASP.NET Web Matrix Starter Kit (Bpg-Other)
ISBN: 0735618569
EAN: 2147483647
Year: 2003
Pages: 169
Authors: Mike Pope
BUY ON AMAZON

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