<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Coding4Fun : starter kit</title><link>http://blogs.msdn.com/coding4fun/archive/tags/starter+kit/default.aspx</link><description>Tags: starter kit</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Does the S in SQL stand for Scary?</title><link>http://blogs.msdn.com/coding4fun/archive/2009/11/09/9919667.aspx</link><pubDate>Mon, 09 Nov 2009 17:54:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9919667</guid><dc:creator>Coding4Fun</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/coding4fun/comments/9919667.aspx</comments><wfw:commentRss>http://blogs.msdn.com/coding4fun/commentrss.aspx?PostID=9919667</wfw:commentRss><wfw:comment>http://blogs.msdn.com/coding4fun/rsscomments.aspx?PostID=9919667</wfw:comment><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/coding4fun/WindowsLiveWriter/DoestheSinSQLstandforScary_8B3B/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" align="right" src="http://blogs.msdn.com/blogfiles/coding4fun/WindowsLiveWriter/DoestheSinSQLstandforScary_8B3B/image_thumb.png" width="240" height="138" /&gt;&lt;/a&gt; Nope, it stands for structured actually.&amp;#160; But if you are a bit afraid of SQL, MSDev.com has &lt;a href="http://www.msdev.com/Directory/SeriesDescription.aspx?CourseId=124"&gt;20 how-to videos about SQL Server 2008 Express&lt;/a&gt;!&amp;#160; This series of short how-to-videos will touch on SQL Server Express 2008 features such as: how to backup a SQL Express database, how to backup a remote SQL Express database, how to restore a SQL Express database, how to update SQL Server Express 2005 to SQL Server Express 2008 and more.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9919667" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/coding4fun/archive/tags/c4fnews/default.aspx">c4fnews</category><category domain="http://blogs.msdn.com/coding4fun/archive/tags/starter+kit/default.aspx">starter kit</category><category domain="http://blogs.msdn.com/coding4fun/archive/tags/SQL/default.aspx">SQL</category></item><item><title>Extending the Personal Web Site Starter Kit</title><link>http://blogs.msdn.com/coding4fun/archive/2006/11/03/942789.aspx</link><pubDate>Fri, 03 Nov 2006 16:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:942789</guid><dc:creator>Coding4Fun</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/coding4fun/comments/942789.aspx</comments><wfw:commentRss>http://blogs.msdn.com/coding4fun/commentrss.aspx?PostID=942789</wfw:commentRss><wfw:comment>http://blogs.msdn.com/coding4fun/rsscomments.aspx?PostID=942789</wfw:comment><description>&lt;SPAN id=c4fmetadata&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=1 width="100%" border=0&gt;
&lt;TBODY&gt;
&lt;TR class=entry_overview&gt;
&lt;TD class="" width=50&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;SPAN class=entry_description&gt;This article shows how to work with the foundation of the Personal Web Site Starter Kit and expand upon it for your own personal use. It is rather easy to start incorporating your own features into this simple-to-use starter kit.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" colSpan=2&gt;
&lt;DIV class=entry_author&gt;Bill Evjen Reuters&lt;/DIV&gt;
&lt;DIV class=entry_company&gt;&lt;A href="http://blogs.msdn.com/controlpanel/blogs/"&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;BR&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Difficulty: &lt;/B&gt;&lt;SPAN class=entry_details_input&gt;Intermediate&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Time Required:&lt;/B&gt; &lt;SPAN class=entry_details_input&gt;1-3 hours&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Cost: &lt;/B&gt;&lt;SPAN class=entry_details_input&gt;Less Than $50&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Software: &lt;/B&gt;&lt;SPAN class=entry_details_input&gt;&lt;A href="http://msdn.com/express/"&gt;Visual Studio Express Editions&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Hardware: &lt;/B&gt;&lt;SPAN class=entry_details_input&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Download: &lt;/B&gt;&lt;A href="http://go.microsoft.com/fwlink/?linkid=46243&amp;amp;clcid=0x409"&gt;Download&lt;/A&gt; 
&lt;UL&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;B&gt;Summary: &lt;/B&gt;Learn how to extend the new Personal Web Site Starter Kit, which is an available project type in Visual Web Developer 2005 Express Edition. (21 printed pages) &lt;/P&gt;
&lt;H4&gt;Contents&lt;BR&gt;&lt;/H4&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic1" mce_href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic1"&gt;Introduction&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic2" mce_href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic2"&gt;First, Personalize Your Site&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic3" mce_href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic3"&gt;Extending the Administration Abilities&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic4" mce_href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic4"&gt;Conclusion&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic6" mce_href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic6"&gt;Related Books&lt;/A&gt;&lt;BR&gt;&lt;A href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic5" mce_href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx#extendpws_topic5"&gt;About the Author&lt;/A&gt; &lt;/P&gt;
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Introduction&lt;/H4&gt;
&lt;P&gt;Inside Visual Studio 2005 and Visual Web Developer 2005 Express Edition, you will find an ASP.NET project type labeled as &lt;I&gt;Personal Web Site Starter Kit&lt;/I&gt;. This project type provides you with a basic Web site to modify as your own. I provide an overview of the starter kit in my article &lt;A href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx?pull=/library/en-us/dnaspp/html/pws.asp" mce_href="http://msdn.microsoft.com/coding4fun/webcoder/extendpws/default.aspx?pull=/library/en-us/dnaspp/html/pws.asp"&gt;Introducing the Personal Web Site Starter Kit&lt;/A&gt;. If you need an introduction to the starter kit, then I recommend that you review this previous article first. &lt;/P&gt;
&lt;P&gt;The Personal Web Site Starter Kit includes a home page, a resume page, a page that allows you to list your favorite links, and a photo album. The main piece of the starter kit is focused on the photo album and the administrator pages built around this functionality, which allows you to upload, modify, and delete photos as well as entire albums. &lt;/P&gt;
&lt;P&gt;The starter kit is a great example of how to use some of the new and exciting features provided by ASP.NET 2.0 in an application. This starter kit utilizes master pages (the ability to provide your application with a master template), new configuration capabilities, XML definitions of the site structure (&lt;CODE&gt;.sitemap&lt;/CODE&gt; files), and more. &lt;/P&gt;
&lt;P&gt;This article will take a look at how to extend some of these features, which is the explicit purpose of the starter kit. It is called a starter kit for a reason! You should consider this starter kit as a starting point to use and build a truly unique application for yourself. In the end, you might not even end up with what is referred to as a personal Web site; but instead, it might be something else entirely. &lt;/P&gt;
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;First, Personalize Your Site&lt;/H4&gt;
&lt;P&gt;The first thing you will want to do is to go through the site and completely personalize the pages you are going to keep in the application. This means changes to the master page and any of the content pages contained within the application. &lt;/P&gt;
&lt;P&gt;Besides that, one important item you should be aware of for this application is that it doesn't take advantage of any sort of .NET caching capabilities. This means that each page is not stored in the system cache to reuse in order to save the cost of regenerating the page. &lt;/P&gt;
&lt;P&gt;In most cases, you are most likely going to be presenting data on your personal Web site that isn't going to be changing frequently. Therefore, to get better performance from your application, you can specify that your ASP.NET pages should be cached for a specific period of time. &lt;/P&gt;
&lt;P&gt;However, since this application makes use of the new capability of using master pages and content pages, there are now two pages that are combined when invoked to create a single ASP.NET page. Since this is the case, where exactly would you apply the caching? &lt;/P&gt;
&lt;P&gt;When using master pages, you would apply caching to the content page, not to the master page. When using the &lt;CODE&gt;OutputCache&lt;/CODE&gt; page directive, you need to place this in the content page for your page for any caching to occur. This is shown here:&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=asp&gt;&amp;lt;%@ OutputCache Duration="60" VaryByParam="None" %&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;Placing this page directive in any of the content pages of your application will cause both the contents of the content page and the associated master page to be cached by the system (remember that it is a single page at this point) for 60 seconds. &lt;/P&gt;
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Extending the Administration Abilities&lt;/H4&gt;
&lt;P&gt;The rest of this article will look at extending various parts of the application by examining the administrator's abilities to remotely manage the content of the application. &lt;/P&gt;
&lt;P&gt;Presently, if you are logged in as an administrator for the application, you will have the ability to create, delete, or modify photo albums that are presented through the application. The rest of the application's content, mainly the textual content and the provided "cool links," are just hard-coded text contained in the content pages themselves. We will take a look at placing some of these items in a SQL Express database as well as making this content remotely manageable through the browser, as are the photo albums. &lt;/P&gt;
&lt;H5&gt;Adding a Page to the Application&lt;/H5&gt;
&lt;P&gt;The first step that we will take is to add some additional pages to the overall application. Presently, when you log into the application as an administrator and click on the Manage link, you are brought to the &lt;CODE&gt;Albums.aspx&lt;/CODE&gt; page shown here in Figure 1. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig013.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig013.gif" atomicselection="true"&gt;&lt;IMG src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig01_thumb1.gif" mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig01_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 1. Albums administration page&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;As you can see, the main administration page allows you to create and manage photo albums as well the ability to add and modify the user database, which really is simply a link to the &lt;CODE&gt;webadmin.axd&lt;/CODE&gt; http handler (this will run only for the local user). &lt;/P&gt;
&lt;P&gt;In order to add the ability for the site administrator to manage some site content from this page in addition to the photo albums presented, we are going to have to make some changes here. You could just add these new management capabilities to the page presented here in Figure 1, but instead of that, let's add a couple of additional management pages just to make it a little more interesting. &lt;/P&gt;
&lt;P&gt;For our example, let's cause the Manage link to go to a simple page that allows for further navigation to manage the photo albums, another page to manage users, and a third page to manage site content. &lt;/P&gt;
&lt;P&gt;To create these new pages, let's first make the necessary changes to the &lt;CODE&gt;web.sitemap&lt;/CODE&gt; file. The original &lt;CODE&gt;web.sitemap&lt;/CODE&gt; file is presented in Listing 1. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Listing 1: The original web.sitemap file&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN class=html&gt;xml&lt;/SPAN&gt; &lt;SPAN class=attr&gt;version&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="1.0"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;encoding&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="utf-8"&lt;/SPAN&gt; ?&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMap&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Home"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Default.aspx"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Resume"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Resume.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Links"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Links.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Albums"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Albums.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Photos"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Photos.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Details"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Details.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Register"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Register.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Manage"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Admin/Albums.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Photos"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Admin/Photos.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Details"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Admin/Details.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMap&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;A sitemap is an XML description of your application's structure. This definition is then used by various site navigation server controls that are made available to you. For instance, the Personal Web Site Starter Kit uses the &lt;CODE&gt;Menu&lt;/CODE&gt; server control at the top of the application in a horizontal view. This control simply reads the content of the &lt;CODE&gt;web.sitemap&lt;/CODE&gt; file through a &lt;CODE&gt;SiteMapDataSource&lt;/CODE&gt; server control in order to generate its results. This menu is presented here in Figure 2. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig028.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig028.gif" atomicselection="true"&gt;&lt;IMG height=52 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig02_thumb6.gif" width=404 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig02_thumb6.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 2. The new menu&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;If you look at the original &lt;CODE&gt;.sitemap&lt;/CODE&gt; file shown in Listing 1, you can see that the Manage link is defined to use the URL &lt;CODE&gt;Admin/Albums.aspx&lt;/CODE&gt;. For our example, let's change around the Admin section so that we can break out some of the management capabilities onto separate pages. In the end, you should have a &lt;CODE&gt;web.sitemap&lt;/CODE&gt; file as presented here in Listing 2. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Listing 2: The modified web.sitemap&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN class=html&gt;xml&lt;/SPAN&gt; &lt;SPAN class=attr&gt;version&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="1.0"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;encoding&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="utf-8"&lt;/SPAN&gt; ?&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMap&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Home"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Default.aspx"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Resume"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Resume.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Links"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Links.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Albums"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Albums.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Photos"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Photos.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Details"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Details.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Register"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Register.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Manage"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Admin/Manage.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Albums"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Admin/Albums.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Photos"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Admin/Photos.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;               &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Details"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Admin/Details.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Site Content"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Admin/Content.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt; &lt;SPAN class=attr&gt;title&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Manage Users"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;url&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Admin/Users.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMapNode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;siteMap&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;From this example, you can see that adding additional pages to the application's navigation system is simply a matter of adding some additional XML nodes to the &lt;CODE&gt;web.sitemap&lt;/CODE&gt; document. In this case, we changed the destination of the Manage link (it now points to &lt;CODE&gt;Admin/Manage.aspx&lt;/CODE&gt;) and we added two new pages: &lt;CODE&gt;Content.aspx&lt;/CODE&gt; and &lt;CODE&gt;Users.aspx&lt;/CODE&gt;. Now let's look at creating some of these pages. &lt;/P&gt;
&lt;H6&gt;Manage.aspx&lt;/H6&gt;
&lt;P&gt;Let's create a new page for the Manage link in the navigation system: &lt;CODE&gt;Manage.aspx&lt;/CODE&gt;. In creating &lt;CODE&gt;Manage.aspx&lt;/CODE&gt;, remember that we are going to want to create this ASP.NET page so that it is located in the Admin folder (as seen in the Visual Studio Solution Explorer). To do this, right-click the Admin folder in the Solution Explorer and select &lt;B&gt;Add New Item&lt;/B&gt;. This will pull up the &lt;B&gt;Add New Item&lt;/B&gt; dialog box, which will allow you to select a new Web form. This is shown here in Figure 3. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig034.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig034.gif" atomicselection="true"&gt;&lt;IMG height=303 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig03_thumb2.gif" width=450 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig03_thumb2.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 3. Adding a new content page&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;In this dialog box, note that we are interested in creating a &lt;I&gt;content page&lt;/I&gt;. A content page works with a master page and we have specified this by selecting the &lt;B&gt;Select master page&lt;/B&gt; check box. Doing this and clicking &lt;B&gt;Add&lt;/B&gt; will pull up another dialog that allows you to select the master page to use for this particular content page. In this case, there is only one master page to choose from: &lt;CODE&gt;Default.master&lt;/CODE&gt;. &lt;/P&gt;
&lt;P&gt;This content page —&lt;CODE&gt;Manage.aspx&lt;/CODE&gt;— will simply contain three image buttons. The code for this page is presented here in Listing 3. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Listing 3: Manage.aspx&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=asp&gt;&amp;lt;%@ Page Language="VB" MasterPageFile="~/Default.master" &lt;BR&gt;    AutoEventWireup="false" CodeFile="Manage.aspx.vb" Inherits="Manage" &lt;BR&gt;    title="Manage Your Personal Web Site" %&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Content&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Content1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ContentPlaceHolderID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Main"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Server"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;class&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="shim column"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;class&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="page"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="admin-albums"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="sidebar"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;          &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;h3&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Choose an area to manage&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;h3&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="content"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;          &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;table&lt;/SPAN&gt; &lt;SPAN class=attr&gt;width&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="90%"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;tr&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;             &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;td&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ImageButton&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="ImageButton1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;                  &lt;SPAN class=attr&gt;ImageUrl&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="../Images/button_sitecontent.gif"&lt;/SPAN&gt; &lt;BR&gt;                  &lt;SPAN class=attr&gt;PostBackUrl&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Content.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;td&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;             &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;td&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ImageButton&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="ImageButton2"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;                  &lt;SPAN class=attr&gt;ImageUrl&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="../Images/button_manageusers.gif"&lt;/SPAN&gt;  &lt;BR&gt;                  &lt;SPAN class=attr&gt;PostBackUrl&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Users.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;td&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;             &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;td&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ImageButton&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="ImageButton3"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;                  &lt;SPAN class=attr&gt;ImageUrl&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="../Images/button_albums.gif"&lt;/SPAN&gt;  &lt;BR&gt;                  &lt;SPAN class=attr&gt;PostBackUrl&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Albums.aspx"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;td&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;tr&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;table&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Content&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;Since this is a content page, you can see that it points to the master page to use the &lt;CODE&gt;@Page&lt;/CODE&gt; directive's &lt;CODE&gt;MasterPageFile&lt;/CODE&gt; attribute. Also, this page is rather simple. It uses the same CSS classes as the &lt;CODE&gt;Albums.aspx&lt;/CODE&gt; page found in the Admin folder and simply contains a table holding three image buttons that each point to a different administration page. Running this page in the browser produces the graphic shown here in Figure 4. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig043.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig043.gif" atomicselection="true"&gt;&lt;IMG height=277 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig04_thumb1.gif" width=450 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig04_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 4. The new Administration home page&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;Now that the &lt;CODE&gt;Manage.aspx&lt;/CODE&gt; page is in place, the next step we will take is to create the &lt;CODE&gt;Users.aspx&lt;/CODE&gt; page. I explain how in the next section. &lt;/P&gt;
&lt;H6&gt;Users.aspx&lt;/H6&gt;
&lt;P&gt;This page will be rather simple to create. If you look back at Figure 1, you will notice that there is a small section on the page that is dedicated to allowing you to manage your users and the user's settings (shown in the lower left-hand corner of the page). Since we want to separate the administration functionality a bit, we will end up pulling this section from the &lt;CODE&gt;Albums.aspx&lt;/CODE&gt; page and then placing it in the &lt;CODE&gt;Users.aspx&lt;/CODE&gt; page instead. &lt;/P&gt;
&lt;P&gt;The first step is to create the &lt;CODE&gt;Users.aspx&lt;/CODE&gt; page. Just like the &lt;CODE&gt;Manage.aspx&lt;/CODE&gt; page, create the &lt;CODE&gt;Users.aspx&lt;/CODE&gt; page inside of the Admin folder and make sure that it is a content page using the &lt;CODE&gt;Default.master&lt;/CODE&gt; page as its master template. &lt;/P&gt;
&lt;P&gt;The code to use for &lt;CODE&gt;Users.aspx&lt;/CODE&gt; is shown here in Listing 4. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Listing 4: Users.aspx&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=asp&gt;&amp;lt;%@ Page Language="VB" MasterPageFile="~/Default.master" &lt;BR&gt;    AutoEventWireup="false" CodeFile="Users.aspx.vb" Inherits="Users" &lt;BR&gt;    title="Manage Users" %&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Content&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Content1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ContentPlaceHolderID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Main"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Server"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;class&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="shim column"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;class&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="page"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="admin-albums"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="sidebar"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;          &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;h3&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Users and Settings&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;h3&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="content"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;To add or remove user accounts and change other site-wide &lt;BR&gt;         settings, use the &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt; &lt;SPAN class=attr&gt;href&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="webadmin.axd"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;ASP.NET Web Site &lt;BR&gt;         Administration Tool&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;.&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Note: If this site is being hosted on &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Visual Web Developer &lt;BR&gt;         Web Server&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;, please&lt;BR&gt;         access the &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;ASP.NET Web Site Administration Tool&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt; via the &lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;ASP.NET Configuration&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         menu item within Visual Web Developer.&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Content&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;This page is very much like the &lt;CODE&gt;Manage.aspx&lt;/CODE&gt; page. It uses the same CSS styling and has some simple text and a link to the &lt;CODE&gt;webadmin.axd&lt;/CODE&gt; http handler. Again, it is important to note that you will be able to invoke this http handler only as a local user on the server. &lt;/P&gt;
&lt;P&gt;Figure 5 illustrates what is produced by the &lt;CODE&gt;Users.aspx&lt;/CODE&gt; page. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig053.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig053.gif" atomicselection="true"&gt;&lt;IMG height=277 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig05_thumb1.gif" width=450 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig05_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 5. The new User Administration page&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;The next and final step is to create an administration page that will allow us to manage the content of the home page. &lt;/P&gt;
&lt;H4&gt;Building a Simple Content Management System&lt;/H4&gt;
&lt;P&gt;If you look at the home page for the Personal Web Site Starter Kit, you will notice that much of the text it contains is hard-coded in the actual page. Though this works, let's look at changing this structure so that the content is retrieved from a SQL Server 2005 Express database instead. We will also look at allowing the site administrator (someone under the Administrators role) to update this information directly from an admin page that we will later create (&lt;CODE&gt;Content.aspx&lt;/CODE&gt;). &lt;/P&gt;
&lt;P&gt;The first step we will take to achieve this is to modify the SQL Express file, &lt;CODE&gt;Personal.mdf&lt;/CODE&gt;. We will use &lt;CODE&gt;Personal.mdf&lt;/CODE&gt; to store the home page content in addition to the photo album information for which it is already used. It is important to note that this is just one example. You could also build this content management system to use an XML file instead of the SQL Express file. &lt;/P&gt;
&lt;H5&gt;Modifying the Personal.mdf File&lt;/H5&gt;
&lt;P&gt;From the Visual Web Developer Solution Explorer, expand the App_Data folder. You will notice that there are two SQL Server Express files in this folder, &lt;CODE&gt;ASPNETDB.mdf&lt;/CODE&gt; and &lt;CODE&gt;Personal.mdf&lt;/CODE&gt;. &lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;ASPNETDB.mdf&lt;/CODE&gt; is used by ASP.NET to store values for the various systems that are part of ASP.NET such as the new membership and role management systems. All the application roles and the user's credentials are stored in this database file. &lt;/P&gt;
&lt;P&gt;The &lt;CODE&gt;Personal.mdf&lt;/CODE&gt; file is used to store the photo album information and even the photos themselves (they are contained within the Photos table). Our first step is to add a new table to this database. This new table is where we will store the text that will appear on the home page of the Personal Web Site Starter Kit. &lt;/P&gt;
&lt;P&gt;To create a new table in the SQL Server Express file, choose the Database Explorer tab in Visual Web Developer and expand the Data Connections root node. Expand the Tables folder for the &lt;CODE&gt;Personal.mdf&lt;/CODE&gt; database presented by expanding Personal.mdf, then Tables in the Database Explorer. You will see that this database contains two tables called Albums and Photos. To add an additional table, right-click the Tables folder and select &lt;B&gt;Add New Table&lt;/B&gt; from the list of options. &lt;/P&gt;
&lt;P&gt;In this table, we are interested in adding a few simple columns. Following is a list of columns and their associated data types to add to the table: &lt;/P&gt;
&lt;P&gt;Column Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Data Type&lt;/P&gt;&lt;PRE&gt;TextId                           int&lt;/PRE&gt;&lt;PRE&gt;Homepage_Welcome                 varchar(MAX)&lt;/PRE&gt;&lt;PRE&gt;Homepage_WhatsNew                varchar(MAX)&lt;/PRE&gt;&lt;PRE&gt;Homepage_WhatsUpLately&amp;nbsp;        &amp;nbsp; varchar(MAX)&lt;/PRE&gt;
&lt;P&gt;After these columns are in place, right-click the &lt;CODE&gt;TextId&lt;/CODE&gt; column and set this column to be a primary key. Doing this will allow us to later update the other columns as the update will require a way to identify the row that needs updating (even though we are using just one row in the table). &lt;/P&gt;
&lt;P&gt;In the end, your table definition should appear as shown in Figure 6. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig063.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig063.gif" atomicselection="true"&gt;&lt;IMG height=150 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig06_thumb1.gif" width=416 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig06_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 6. Table definition&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;Next, save the table and you will then be presented with a dialog box that asks you to name the table. Name the table SiteContent. After the table is named and saved, it will then appear in the Database Explorer with the other two tables. Next, right-click the newly created table &lt;CODE&gt;SiteContent&lt;/CODE&gt; and select &lt;B&gt;Show Table Data&lt;/B&gt; from the list of options. This will show a list of columns plus the data contained within each (which will be just NULL values at this point). &lt;/P&gt;
&lt;P&gt;From here, you can enter in the content of your page, but since we will be building a page to do this later, let's just enter a numeric &lt;CODE&gt;0&lt;/CODE&gt; in the &lt;CODE&gt;TextId &lt;/CODE&gt;column and the string "&lt;CODE&gt;Test&lt;/CODE&gt;" in each of the other columns. This is illustrated here in Figure 7. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig073.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig073.gif" atomicselection="true"&gt;&lt;IMG height=60 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig07_thumb1.gif" width=450 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig07_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 7. Adding content to the new table&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;Now that the &lt;CODE&gt;Personal.mdf&lt;/CODE&gt; file contains the additional table that will drive the home page of the application, let's next re-code the home page to work from this database table. &lt;/P&gt;
&lt;H6&gt;Re-coding the Default.aspx page to work from the Personal.mdf file&lt;/H6&gt;
&lt;P&gt;Pull up the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page in Visual Studio and scroll to the bottom of the page. Here at the bottom is an &lt;CODE&gt;ObjectDataSource&lt;/CODE&gt; control. This control drives the photo that appears on the sidebar of the page. ASP.NET 2.0 provides a number of new data controls that work to pull data from different data sources as well as perform operations such as inserting, deleting, and updating data in these data stores. Looking in the Toolbox of Visual Studio, you will notice that in addition to the &lt;CODE&gt;ObjectDataSource&lt;/CODE&gt; control used in the Personal Web Site Starter Kit, there are also data source controls for working with SQL databases, Microsoft Access, XML sources, and sitemaps. The &lt;CODE&gt;ObjectDataSource&lt;/CODE&gt; control used on the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page is shown here:&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ObjectDataSource&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="ObjectDataSource1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt;  &lt;BR&gt; &lt;SPAN class=attr&gt;TypeName&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="PhotoManager"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;SelectMethod&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="GetPhotos"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ObjectDataSource&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;You would use the &lt;CODE&gt;ObjectDataSource&lt;/CODE&gt; control when you are interested in using a traditional three-tiered model when it comes to working with data that is presented on your page. From this example, you can see that the photos are retrieved through the class &lt;CODE&gt;PhotoManager&lt;/CODE&gt; (specified by the &lt;CODE&gt;TypeName&lt;/CODE&gt; attribute) using the &lt;CODE&gt;GetPhotos&lt;/CODE&gt; method (specified by the &lt;CODE&gt;SelectMethod&lt;/CODE&gt; attribute). You will find the &lt;CODE&gt;PhotoManager.vb&lt;/CODE&gt; or &lt;CODE&gt;.cs&lt;/CODE&gt; class file in the App_Code folder of your project. Contained within this class, you will then find the &lt;CODE&gt;GetPhotos&lt;/CODE&gt; method : &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Visual C#&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; List&amp;lt;Photo&amp;gt; GetPhotos()&lt;BR&gt;{&lt;BR&gt;        &lt;SPAN class=kwrd&gt;return&lt;/SPAN&gt; GetPhotos(GetRandomAlbumID());&lt;BR&gt;}&lt;BR&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;&lt;B&gt;Visual Basic&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;Public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;Shared&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;Function&lt;/SPAN&gt; GetPhotos() &lt;SPAN class=kwrd&gt;As&lt;/SPAN&gt; Generic.List(Of Photo)&lt;BR&gt;        &lt;SPAN class=kwrd&gt;Return&lt;/SPAN&gt; GetPhotos(GetRandomAlbumID())&lt;BR&gt;&lt;SPAN class=kwrd&gt;End&lt;/SPAN&gt; Function&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;In changing the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page so that it will now display textual content as retrieved from the &lt;CODE&gt;Personal.mdf&lt;/CODE&gt; file, you could certainly add another class to the App_Code folder that deals with getting this information and then use another &lt;CODE&gt;ObjectDataSource&lt;/CODE&gt; control to invoke a &lt;CODE&gt;Select&lt;/CODE&gt; method in that class. Constructing the site content retrieval in this manner will allow you to extend the data model that the application is already using. However, for the sake of learning, let's instead look at using a &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control to pull the site content data. &lt;/P&gt;
&lt;H6&gt;Setting up the SqlDataSource control&lt;/H6&gt;
&lt;P&gt;To set up a &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control that will be used to pull the site content data from the &lt;CODE&gt;Personal.mdf&lt;/CODE&gt; file, open up the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page in Visual Studio in the Design mode (the Design tab is at the bottom of the document window). Once the page is open in the Design mode, drag a &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control onto the design surface so that it is positioned next to the &lt;CODE&gt;ObjectDataSource&lt;/CODE&gt; control at the bottom of the page. Highlighting the &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control and clicking the green arrow that will appear will allow you to open the control's smart tag. From here, you will then be able to click on the Configure Data Source link. This will launch a wizard that will allow you to configure the &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control to get at the site content data found in the &lt;CODE&gt;Personal.mdf&lt;/CODE&gt; file. The first page of this wizard is shown in Figure 8. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig083.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig083.gif" atomicselection="true"&gt;&lt;IMG height=349 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig08_thumb1.gif" width=450 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig08_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 8. Configuring a Data Source Wizard&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;As the wizard asks you to configure the &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control, you can see that you first need to establish a connection to the &lt;CODE&gt;Personal.mdf&lt;/CODE&gt; file. Since there is already a defined connection in the &lt;CODE&gt;web.config&lt;/CODE&gt; file, you will see the option of &lt;B&gt;Personal&lt;/B&gt; in the drop-down list. Select &lt;B&gt;Personal&lt;/B&gt; and then click the &lt;B&gt;Next&lt;/B&gt; button. &lt;/P&gt;
&lt;P&gt;The next screen in the wizard allows you to specify the table you want to work with. In this case, select &lt;CODE&gt;SiteContent&lt;/CODE&gt; from the drop-down list. Since we want to deal with everything contained in this table, select the asterisk (&lt;CODE&gt;*&lt;/CODE&gt;), a wildcard character that indicates that you are interested in everything this table offers. This is shown here in Figure 9. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig095.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig095.gif" atomicselection="true"&gt;&lt;IMG height=349 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig09_thumb1.gif" width=450 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig09_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 9. Configuring a Data Source: Selecting the table&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;You are now ready to move onto the next screen in the wizard, which allows you to test the connection to the &lt;CODE&gt;Personal.mdf&lt;/CODE&gt; database you just created. Clicking the &lt;B&gt;Test Query&lt;/B&gt; button should produce the results illustrated here in Figure 10. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig103.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig103.gif" atomicselection="true"&gt;&lt;IMG height=349 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig10_thumb1.gif" width=450 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig10_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 10. Configuring a Data Source: Previewing the Data&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;When you are done, click &lt;B&gt;Finish&lt;/B&gt;. Listing 5 shows the code of the &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control that Visual Studio will generate from the instructions provided to the wizard. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Listing 5: The SqlDataSource control code as generated by Visual Studio&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:SqlDataSource&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="SqlDataSource1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt; &lt;SPAN class=attr&gt;ConnectionString&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="&amp;lt;%$ ConnectionStrings:Personal %&amp;gt;"&lt;/SPAN&gt;&lt;BR&gt; &lt;SPAN class=attr&gt;SelectCommand&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="SELECT * FROM [SiteContent]"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:SqlDataSource&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;Now that the &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control is in place, let's move on to the next step of modifying the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page to show the content that will come from this datasource control. &lt;/P&gt;
&lt;H6&gt;Modifying the Default.aspx page to show the content coming from the SqlDataSource control&lt;/H6&gt;
&lt;P&gt;Looking at the source code for the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page, you will notice that the page is a content page that uses the only master page available to it in the application: &lt;CODE&gt;Default.master&lt;/CODE&gt;. This master page exposes a single area for the content page to use. This area is then defined in the content page through the use of a single Content server control located on the page. Inside of the Content server control, you will see that the content page is divided up into a few distinct sections, all of which are defined by &lt;CODE&gt;&amp;lt;div&amp;gt;&lt;/CODE&gt; elements. A framework of this is shown here in Listing 6. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Listing 6: Looking at the structure of the Default.aspx page&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=asp&gt;&amp;lt;%@   Page Language="VB" MasterPageFile="~/Default.master" &lt;BR&gt;      Title="Your Name Here | Home"&lt;BR&gt;      CodeFile="Default.aspx.vb" Inherits="Default_aspx" %&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:content&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Content1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;contentplaceholderid&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Main"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;class&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="shim column"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;class&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="page"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="home"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="sidebar"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=rem&gt;&amp;lt;!-- Content removed for clarity --&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="content"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=rem&gt;&amp;lt;!-- Content removed for clarity --&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:content&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;From this code framework, you can see that the actual page is divided up into two sections: the sidebar content (defined using &lt;CODE&gt;&amp;lt;div id="sidebar"&amp;gt;&lt;/CODE&gt;) and the main part of the page (using &lt;CODE&gt;&amp;lt;div id="content"&amp;gt;&lt;/CODE&gt;). Since we are interested in driving the content contained in the &lt;CODE&gt;&amp;lt;div id="content"&amp;gt;&lt;/CODE&gt; section of the page, let's focus on that part of the page. To accomplish this, we are going to place a &lt;CODE&gt;DataList&lt;/CODE&gt; server control in this section of the page and pull out the values we need using &lt;CODE&gt;Eval&lt;/CODE&gt; statements. This is illustrated in Listing 7. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Listing 7: Using a DataList control to drive the content on the page&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="content"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:DataList&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="DataList1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;    &lt;SPAN class=attr&gt;DataSourceID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="SqlDataSource1"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;ItemTemplate&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;h3&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Welcome   to My Site&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;h3&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=asp&gt;&amp;lt;%&lt;/SPAN&gt;# Eval(&lt;SPAN class=str&gt;"Homepage_Welcome"&lt;/SPAN&gt;)&lt;SPAN class=asp&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;hr&lt;/SPAN&gt;   &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="whatsnew"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;h4&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;What's New&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;h4&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=asp&gt;&amp;lt;%&lt;/SPAN&gt;# Eval(&lt;SPAN class=str&gt;"Homepage_WhatsNew"&lt;/SPAN&gt;) &lt;SPAN class=asp&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="coollinks"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;h4&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Cool Links&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;h4&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;ul&lt;/SPAN&gt; &lt;SPAN class=attr&gt;class&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="link"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;li&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt; &lt;SPAN class=attr&gt;HREF&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="#"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;TARGET&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="_self"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Lorem ipsum dolositionr&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;li&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;li&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt; &lt;SPAN class=attr&gt;HREF&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="#"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;TARGET&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="_self"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Lorem ipsum dolositionr&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;li&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;li&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt; &lt;SPAN class=attr&gt;HREF&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="#"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;TARGET&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="_self"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Lorem ipsum dolositionr&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;li&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;li&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt; &lt;SPAN class=attr&gt;HREF&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="#"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;TARGET&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="_self"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Lorem ipsum dolositionr&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;li&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;li&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt; &lt;SPAN class=attr&gt;HREF&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="#"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;TARGET&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="_self"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Lorem ipsum dolositionr&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;li&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;ul&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;hr&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;h4&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;What's Up Lately &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;h4&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=asp&gt;&amp;lt;%&lt;/SPAN&gt;# Eval(&lt;SPAN class=str&gt;"Homepage_WhatsUpLately"&lt;/SPAN&gt;) &lt;SPAN class=asp&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;ItemTemplate&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:DataList&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;From the example illustrated here in Listing 7, you can see that the &lt;CODE&gt;DataList&lt;/CODE&gt; server control binds itself to the &lt;CODE&gt;SqlDataSource1&lt;/CODE&gt; control by using the &lt;CODE&gt;DataSourceId&lt;/CODE&gt; attribute.&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:DataList&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="DataList1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;DataSourceID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="SqlDataSource1"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:DataList&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;The &lt;CODE&gt;DataList&lt;/CODE&gt; control provides a number of template types that can be used for display purposes. Examples include a header template, footer template, item template, separator template, and more. Since we are interested in displaying a single row from the SiteContent table, we therefore need to employ only the &lt;CODE&gt;&amp;lt;ItemTemplate&amp;gt; &lt;/CODE&gt;node and nothing more. When the &lt;CODE&gt;DataList&lt;/CODE&gt; control is then rendered, it will display the contents of the &lt;CODE&gt;&amp;lt;ItemTemplate&amp;gt;&lt;/CODE&gt; section once for each row contained in the table in which it is bound. &lt;/P&gt;
&lt;P&gt;Inside the &lt;CODE&gt;&amp;lt;ItemTemplate&amp;gt;&lt;/CODE&gt; section, we can then get at the contents for a particular column of the SiteContent table through the use of a data-binding expression Eval. In ASP.NET 2.0, the data binding has been simplified and can now be as simple as:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=asp&gt;&amp;lt;%&lt;/SPAN&gt;# Eval(&lt;SPAN class=str&gt;"Homepage_Welcome"&lt;/SPAN&gt;) &lt;SPAN class=asp&gt;%&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;This statement will cause the contents contained in the table column Homepage_Welcome to be displayed in its place. &lt;/P&gt;
&lt;P&gt;Save the Default.aspx page and run it in the browser. You should now see the results as shown in Figure 11. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig113.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig113.gif" atomicselection="true"&gt;&lt;IMG height=325 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig11_thumb1.gif" width=450 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig11_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 11. The new dynamic home page&lt;/B&gt; &lt;/P&gt;
&lt;H6&gt;Creating an administrator page to update the page content&lt;/H6&gt;
&lt;P&gt;Our final step is to create a page for the Site Content link of the &lt;CODE&gt;Manage.aspx&lt;/CODE&gt; page. This new page will allow administrators to update the content that appears on the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page. For this step, create a new content page called &lt;CODE&gt;Content.aspx&lt;/CODE&gt; that uses the &lt;CODE&gt;Default.master&lt;/CODE&gt; page as a template. &lt;/P&gt;
&lt;P&gt;This page will require you to place a &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control on it. The configuration of this &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control will be a bit different than that of the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page. Since we are going to be also dealing with the updating of the data on this administration page, we are therefore interested in having this &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control perform the proper updates to the data contained in the SiteContent table. Therefore, as you work through the SqlDataSource control's configuration wizard, when you are working from the Select statement page of the wizard, click the &lt;B&gt;Advanced&lt;/B&gt; button in the dialog box and select the first check box to build a &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control that will allow for the updating of the data. These dialogs are shown here in Figure 12. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig123.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig123.gif" atomicselection="true"&gt;&lt;IMG height=314 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig12_thumb1.gif" width=450 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig12_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 12. Automatically generating SQL statements&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;After working through the wizard, your &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control should appear as shown in Listing 8. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Listing 8: The SqlDataSource control code as generated by Visual Studio&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:SqlDataSource&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="SqlDataSource1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;  &lt;SPAN class=attr&gt;ConnectionString&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="&amp;lt;%$ ConnectionStrings:Personal %&amp;gt;"&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=attr&gt;DeleteCommand&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="DELETE FROM [SiteContent] WHERE [TextId] = &lt;BR&gt;   @original_TextId"&lt;/SPAN&gt; &lt;BR&gt;&lt;SPAN class=attr&gt;InsertCommand&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="INSERT INTO [SiteContent] ([TextId], &lt;BR&gt;   [Homepage_Welcome], [Homepage_WhatsNew], [Homepage_WhatsUpLately]) &lt;BR&gt;   VALUES (@TextId, @Homepage_Welcome, @Homepage_WhatsNew, &lt;BR&gt;   @Homepage_WhatsUpLately)"&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=attr&gt;SelectCommand&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="SELECT * FROM [SiteContent]"&lt;/SPAN&gt; &lt;BR&gt;&lt;SPAN class=attr&gt;UpdateCommand&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="UPDATE [SiteContent] SET [Homepage_Welcome] = &lt;BR&gt;   @Homepage_Welcome, [Homepage_WhatsNew] = @Homepage_WhatsNew, &lt;BR&gt;   [Homepage_WhatsUpLately] = @Homepage_WhatsUpLately WHERE [TextId] = &lt;BR&gt;   @original_TextId"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;DeleteParameters&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Parameter&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="original_TextId"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Int32"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;DeleteParameters&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;UpdateParameters&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Parameter&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_Welcome"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="String"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Parameter&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_WhatsNew"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="String"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Parameter&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_WhatsUpLately"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="String"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Parameter&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="original_TextId"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Int32"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;UpdateParameters&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;InsertParameters&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Parameter&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="TextId"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Int32"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Parameter&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_Welcome"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="String"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Parameter&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_WhatsNew"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="String"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;            &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Parameter&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_WhatsUpLately"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="String"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;        &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;InsertParameters&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;    &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:SqlDataSource&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;Of course, we are interested only in reading (using the &lt;CODE&gt;Select&lt;/CODE&gt; statement) and updating (using the &lt;CODE&gt;Update&lt;/CODE&gt; statement) the data in the SiteContent table. Since we are not interested in deleting or inserting new rows of data into the SiteContent table, you can feel free to delete the &lt;CODE&gt;UpdateCommand&lt;/CODE&gt; and &lt;CODE&gt;InsertCommand&lt;/CODE&gt; attributes and their values from the &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control. You can also feel free to delete the &lt;CODE&gt;&amp;lt;DeleteParameters&amp;gt;&lt;/CODE&gt; and the &lt;CODE&gt;&amp;lt;InsertParameters&amp;gt;&lt;/CODE&gt; sections as well. &lt;/P&gt;
&lt;P&gt;Now that the &lt;CODE&gt;SqlDataSource&lt;/CODE&gt; control is in place, let's add a &lt;CODE&gt;FormView&lt;/CODE&gt; control to the page to drive all the displaying and updating of the content to the SiteContent table. Drag and drop a &lt;CODE&gt;FormView&lt;/CODE&gt; control onto the &lt;CODE&gt;Content.aspx&lt;/CODE&gt; page. &lt;/P&gt;
&lt;P&gt;From the smart tab of the &lt;CODE&gt;FormView&lt;/CODE&gt; control, select the &lt;CODE&gt;SqlDataSource1&lt;/CODE&gt; control instance as the data source to use. Then, moving back to the source code view of the &lt;CODE&gt;Content.aspx&lt;/CODE&gt; page, you can see that a lot of code has been added to the &lt;CODE&gt;FormView&lt;/CODE&gt; control. Since we are interested in updating only a single row of content and we are not interesting in deleting the row of data from the SiteContent table or adding any new rows to the table, you should then delete the &lt;CODE&gt;&amp;lt;InsertItemTemplate&amp;gt;&lt;/CODE&gt; section. Also, in the &lt;CODE&gt;&amp;lt;ItemTemplate&amp;gt;&lt;/CODE&gt; section, delete the &lt;CODE&gt;LinkButtons&lt;/CODE&gt; for deleting and adding new content. The only &lt;CODE&gt;LinkButton&lt;/CODE&gt; control in the &lt;CODE&gt;&amp;lt;ItemTemplate&amp;gt;&lt;/CODE&gt; section should be for editing the content displayed. After a little styling and deleting the above-mentioned sections, your &lt;CODE&gt;FormView&lt;/CODE&gt; control should appear similar to that illustrated in Listing 9. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Listing 9: The FormView control (after modifications)&lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:FormView&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="FormView1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;DataKeyNames&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="TextId"&lt;/SPAN&gt; &lt;BR&gt; &lt;SPAN class=attr&gt;DataSourceID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="SqlDataSource1"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;EditItemTemplate&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;TextId:&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Label&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="TextIdLabel1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;      &lt;SPAN class=attr&gt;Text&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;='&amp;lt;%# Eval("TextId") %&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Label&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Homepage_Welcome:&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;br&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:TextBox&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_WelcomeTextBox"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;      &lt;SPAN class=attr&gt;Text&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;='&amp;lt;%# Bind("Homepage_Welcome") %&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class=attr&gt;TextMode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="MultiLine"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:TextBox&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Homepage_WhatsNew:&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;br&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:TextBox&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_WhatsNewTextBox"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;      &lt;SPAN class=attr&gt;Text&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;='&amp;lt;%# Bind("Homepage_WhatsNew") %&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class=attr&gt;TextMode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="MultiLine"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:TextBox&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Homepage_WhatsUpLately:&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;br&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:TextBox&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_WhatsUpLatelyTextBox"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;      &lt;SPAN class=attr&gt;Text&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;='&amp;lt;%# Bind("Homepage_WhatsUpLately") %&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class=attr&gt;TextMode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="MultiLine"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:TextBox&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:LinkButton&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="UpdateButton"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;      &lt;SPAN class=attr&gt;CausesValidation&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="True"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;CommandName&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Update"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Text&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Update"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:LinkButton&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:LinkButton&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="UpdateCancelButton"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;      &lt;SPAN class=attr&gt;CausesValidation&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="False"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;CommandName&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Cancel"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Text&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Cancel"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:LinkButton&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;EditItemTemplate&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;ItemTemplate&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;TextId:&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Label&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="TextIdLabel"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;      &lt;SPAN class=attr&gt;Text&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;='&amp;lt;%# Eval("TextId") %&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Label&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Homepage_Welcome:&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;br&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Label&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_WelcomeLabel"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;      &lt;SPAN class=attr&gt;Text&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;='&amp;lt;%# Bind("Homepage_Welcome") %&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Label&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Homepage_WhatsNew:&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;br&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Label&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_WhatsNewLabel"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;      &lt;SPAN class=attr&gt;Text&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;='&amp;lt;%# Bind("Homepage_WhatsNew") %&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Label&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Homepage_WhatsUpLately:&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;b&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;br&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Label&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Homepage_WhatsUpLatelyLabel"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;      &lt;SPAN class=attr&gt;Text&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;='&amp;lt;%# Bind("Homepage_WhatsUpLately") %&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:Label&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;p&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:LinkButton&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="EditButton"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; &lt;BR&gt;      &lt;SPAN class=attr&gt;CausesValidation&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="False"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;CommandName&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Edit"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Text&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Edit"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:LinkButton&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;   &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;ItemTemplate&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:FormView&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;From this code listing, you can see that we added a few break lines and changed the edit template so that instead of using standard &lt;CODE&gt;TextBox&lt;/CODE&gt; controls, we are now using multilined textboxes. &lt;/P&gt;
&lt;P&gt;Running these pages as an administrator will produce the results shown in Figure 13. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig133.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig133.gif" atomicselection="true"&gt;&lt;IMG height=289 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig13_thumb1.gif" width=450 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig13_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 13. The edit content page&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;Clicking the &lt;B&gt;Edit&lt;/B&gt; button will allow you to edit the contents of each of these sections. This is illustrated in Figure 14. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig143.gif" mce_href="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig143.gif" atomicselection="true"&gt;&lt;IMG height=289 src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig14_thumb1.gif" width=450 mce_src="http://www.coding4fun.net/images/ExtendingthePersonalWebSiteStarterKit_E07B/extendpws_fig14_thumb1.gif"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Figure 14. Changing the home page content&lt;/B&gt; &lt;/P&gt;
&lt;P&gt;Now the information placed inside of these controls will be updated into the SiteContent table, which in turn will be output to the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page. Now the content of the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page is remotely manageable. &lt;/P&gt;
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Conclusion&lt;/H4&gt;
&lt;P&gt;This article showed you how to work with the foundation of the Personal Web Site Starter Kit and expand upon it for your own personal use. As you can see, it is rather easy to start incorporating your own features into this simple-to-use starter kit. &lt;/P&gt;
&lt;P&gt;Have fun and happy coding! &lt;/P&gt;
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Related Books&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;B&gt;Bill Evjen,&lt;/B&gt; &lt;A href="http://shopping.msn.com/search/detail.aspx?pcId=12175&amp;amp;prodId=2184857&amp;amp;ptnrid=141&amp;amp;ptnrdata=0" mce_href="http://shopping.msn.com/search/detail.aspx?pcId=12175&amp;amp;prodId=2184857&amp;amp;ptnrid=141&amp;amp;ptnrdata=0"&gt;ASP.NET 2.0 Beta Preview&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=942789" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/coding4fun/archive/tags/starter+kit/default.aspx">starter kit</category><category domain="http://blogs.msdn.com/coding4fun/archive/tags/web/default.aspx">web</category></item><item><title>Introduction to the Personal Web Site Starter Kit</title><link>http://blogs.msdn.com/coding4fun/archive/2006/10/31/913450.aspx</link><pubDate>Tue, 31 Oct 2006 20:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:913450</guid><dc:creator>Coding4Fun</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/coding4fun/comments/913450.aspx</comments><wfw:commentRss>http://blogs.msdn.com/coding4fun/commentrss.aspx?PostID=913450</wfw:commentRss><wfw:comment>http://blogs.msdn.com/coding4fun/rsscomments.aspx?PostID=913450</wfw:comment><description>&lt;SPAN id=c4fmetadata&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=1 width="100%" border=0&gt;
&lt;TBODY&gt;
&lt;TR class=entry_overview&gt;
&lt;TD class="" width=50&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class=""&gt;&lt;SPAN class=entry_description&gt;The Personal Web Site Starter Kit is a great way to learn the fundamentals of how to build a site. It uses some of the strongest features from the latest release of ASP.NET. It is still a valuable resource to use for learning on how to create an application using ASP.NET 2.0&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" colSpan=2&gt;
&lt;DIV class=entry_author&gt;Bill Evjen Reuters&lt;/DIV&gt;
&lt;DIV class=entry_company&gt;&lt;A href="http://blogs.msdn.com/controlpanel/blogs/"&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;BR&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Difficulty: &lt;/B&gt;&lt;SPAN class=entry_details_input&gt;Intermediate&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Time Required:&lt;/B&gt; &lt;SPAN class=entry_details_input&gt;1-3 hours&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Cost: &lt;/B&gt;&lt;SPAN class=entry_details_input&gt;Free&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Software: &lt;/B&gt;&lt;SPAN class=entry_details_input&gt;&lt;A href="http://msdn.com/express/"&gt;Visual Studio Express Editions&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Hardware: &lt;/B&gt;&lt;SPAN class=entry_details_input&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=entry_details&gt;&lt;B&gt;Download: &lt;/B&gt;&lt;A href="http://go.microsoft.com/fwlink/?linkid=46243&amp;amp;clcid=0x409"&gt;Download&lt;/A&gt; 
&lt;UL&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/SPAN&gt;
&lt;H4&gt;Introduction&lt;/H4&gt;
&lt;P&gt;Inside Visual Web Developer 2005 Express Edition, you will find the Personal Web Site Starter Kit, ready for you to start working with right away. The Personal Web Site Starter Kit is designed to provide you with a tool that you can use to quickly put up a worthwhile Web site. This starter kit provides you with a basic home page, a page for your resume, another to place a collection of your favorite links, and another page that enables you to publish your photos. The home page of the Personal Web Site Starter Kit is presented here in Figure 1. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws01.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws01.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 1. Personal Web Site Starter Kit home page&lt;/B&gt; 
&lt;P&gt;The biggest focus of this starter kit is the Albums page, which allows you to publish photo albums. One nice feature of the of the Albums page is that is allows for you to publish albums for the general public, or you can create restricted access to an album and allow it to be viewed only by a select audience. The default Albums page is shown in Figure 2. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws02.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws02.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 2. Photo Gallery home page&lt;/B&gt; 
&lt;P&gt;All the pages in the Personal Web Site Starter Kit are ready for you to delete the default &lt;I&gt;lorem ipsum&lt;/I&gt; text and replace it with your own words. Doing this will instantly give you a personalized Web site. 
&lt;P&gt;The Personal Web Site Starter Kit is a great way for you to learn the fundamentals of how to build a site. You can view the code from the pages of this application, and it uses some of the strongest features from the latest release of ASP.NET. Even if you are not interested in using this starter kit for an actual production Web site, it is still a valuable resource to use for learning on how to create an application using ASP.NET 2.0. 
&lt;P&gt;Before we look at working with this application, let's first start by taking a look at how it is installed. 
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Working with the Starter Kit Default Files&lt;/H4&gt;
&lt;P&gt;Installing the Personal Web Site Starter Kit is as simple as opening a project in Visual Web Developer 2005 Express Edition, since you will find that the application is one of the available projects in this IDE. To create an instance of the starter kit, click &lt;B&gt;File&lt;/B&gt;, then select &lt;B&gt;New Web Site&lt;/B&gt; from the Visual Studio menu. This will open the &lt;B&gt;New Web Site&lt;/B&gt; dialog box, in which you can select the Personal Web Site Starter Kit, as shown in Figure 3. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws03.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws03.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 3. New Web site&lt;/B&gt; 
&lt;P&gt;After you have selected the application, your first step will be to actually build the application and pull it up in a browser. This is so that the database file, &lt;CODE&gt;ASPNETDB.mdf&lt;/CODE&gt;, is created for this particular application. This file is used for the membership and role management capabilities that are now provided by ASP.NET&amp;nbsp;2.0. When the application is first run, we are interested in having the application create a couple of roles within the role management system. 
&lt;P&gt;How are these roles created when the application is first run? Actually, it is pretty interesting how this occurs. Let's take a look at the application's &lt;CODE&gt;Global.asax&lt;/CODE&gt; file to see how this occurs. Note that the &lt;CODE&gt;Global.asax&lt;/CODE&gt; file contains an &lt;CODE&gt;Application_Start&lt;/CODE&gt; function as shown below in Listing 1. 
&lt;P&gt;&lt;B&gt;Listing 1. Creating new roles when the application is first run from the Global.asax&lt;/B&gt; 
&lt;P&gt;&lt;B&gt;Visual Basic&lt;/B&gt; &lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;Sub&lt;/SPAN&gt; Application_Start(&lt;SPAN class=kwrd&gt;ByVal&lt;/SPAN&gt; sender &lt;SPAN class=kwrd&gt;As&lt;/SPAN&gt; [&lt;SPAN class=kwrd&gt;Object&lt;/SPAN&gt;], &lt;SPAN class=kwrd&gt;ByVal&lt;/SPAN&gt; e &lt;SPAN class=kwrd&gt;As&lt;/SPAN&gt; EventArgs)
    &lt;SPAN class=kwrd&gt;AddHandler&lt;/SPAN&gt; SiteMap.SiteMapResolve, &lt;SPAN class=kwrd&gt;AddressOf&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;Me&lt;/SPAN&gt;.AppendQueryString
    &lt;SPAN class=kwrd&gt;If&lt;/SPAN&gt; (Roles.RoleExists(&lt;SPAN class=str&gt;"Administrators"&lt;/SPAN&gt;) = &lt;SPAN class=kwrd&gt;False&lt;/SPAN&gt;) &lt;SPAN class=kwrd&gt;Then&lt;/SPAN&gt;
        Roles.CreateRole(&lt;SPAN class=str&gt;"Administrators"&lt;/SPAN&gt;)
    &lt;SPAN class=kwrd&gt;End&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;If&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;If&lt;/SPAN&gt; (Roles.RoleExists(&lt;SPAN class=str&gt;"Friends"&lt;/SPAN&gt;) = &lt;SPAN class=kwrd&gt;False&lt;/SPAN&gt;) &lt;SPAN class=kwrd&gt;Then&lt;/SPAN&gt;
        Roles.CreateRole(&lt;SPAN class=str&gt;"Friends"&lt;/SPAN&gt;)
     &lt;SPAN class=kwrd&gt;End&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;If&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;End&lt;/SPAN&gt; Sub&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;&lt;B&gt;Visual C#&lt;/B&gt; &lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;void&lt;/SPAN&gt; Application_Start(&lt;SPAN class=kwrd&gt;object&lt;/SPAN&gt; sender, EventArgs e)
{
    SiteMap.SiteMapResolve += 
        &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; SiteMapResolveEventHandler(AppendQueryString);
    &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (!Roles.RoleExists(&lt;SPAN class=str&gt;"Administrators"&lt;/SPAN&gt;))
        Roles.CreateRole(&lt;SPAN class=str&gt;"Administrators"&lt;/SPAN&gt;);
    &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (!Roles.RoleExists(&lt;SPAN class=str&gt;"Friends"&lt;/SPAN&gt;)) 
        Roles.CreateRole(&lt;SPAN class=str&gt;"Friends"&lt;/SPAN&gt;);
}&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;From this method, you can see that a couple of &lt;CODE&gt;If Then&lt;/CODE&gt; statements first check to see whether the roles of the Administrators or Friends exist in the system. This is done using the &lt;CODE&gt;Roles&lt;/CODE&gt; class's &lt;CODE&gt;RoleExists&lt;/CODE&gt; method. If this check is found to be &lt;CODE&gt;False&lt;/CODE&gt;, then the role is created using the &lt;CODE&gt;CreateRole&lt;/CODE&gt; method. 
&lt;P&gt;Once you pull up the application, you can then shut it down, as the next step is to create an administrator user for the application. To create an administrator for the application, click the &lt;B&gt;ASP.NET Configuration&lt;/B&gt; button from the Visual Studio Solution Explorer. This will pull up the Web Site Administration tool directly in Visual Studio. You can also pull up this page by selecting &lt;B&gt;Website&lt;/B&gt; and then clicking &lt;B&gt;ASP.NET Configuration&lt;/B&gt; from the Visual Studio menu. 
&lt;P&gt;After the ASP.NET Configuration page is created and pulled up directly in Visual Studio, you should then use this tool to create a new user who represents the administrator of the site. 
&lt;P&gt;To create this administrative user, click the &lt;B&gt;Security&lt;/B&gt; tab from the ASP.NET Configuration page. This page is shown in Figure 4. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws04.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws04.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 4. Administration page&lt;/B&gt; 
&lt;P&gt;From the Security page, you can create an administrator user by selecting the &lt;I&gt;Create user&lt;/I&gt; link. This will pull up a page with a form for you to input all the user's information, which will be saved to the &lt;CODE&gt;ASPNETDB.mdf&lt;/CODE&gt; file. This form is shown in Figure 5. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws05.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws05.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 5. Adding an administrator&lt;/B&gt; 
&lt;P&gt;As shown in Figure 5, input the administrator's user name, password, e-mail address, and a security question and an answer for the security question. Before clicking the &lt;B&gt;Create User&lt;/B&gt; button, be sure to select the roles in which the administrator belongs. For this example, check the &lt;B&gt;Administrators&lt;/B&gt; check box and then click the &lt;B&gt;Create User&lt;/B&gt; button to create this administrative user. If your application is going to have more than one administrator, simply create another user using the same process. 
&lt;P&gt;Let's next take a look at the pieces of the starter kit so you can understand exactly where you apply the customization points that are required to make this application unique. 
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;The Master Page: Default.master&lt;/H4&gt;
&lt;P&gt;The first item for this starter kit we will examine is the &lt;CODE&gt;Default.master&lt;/CODE&gt; page. ASP.NET 2.0 introduces a way in which to build templated pages. This means that you can build a master template or a master page, which you can then apply to each and every page you designate. You will notice that the single master page used in the Personal Web Site Starter Kit, &lt;CODE&gt;Default.master&lt;/CODE&gt;, also includes a code-behind page (&lt;CODE&gt;Default.master.vb&lt;/CODE&gt; or &lt;CODE&gt;Default.master.cs&lt;/CODE&gt;), as do the standard &lt;CODE&gt;.aspx&lt;/CODE&gt; pages. However, since this master page is only dealing with presentation and is not concerned about any other business logic, you will find that the code-behind page is just the actual code framework of the code-behind page and doesn't include any actual code. 
&lt;P&gt;All the presentation for this page is contained within the &lt;CODE&gt;Default.master&lt;/CODE&gt; page itself. Visual Studio does an excellent job of letting you look at the .master page visually. Clicking the &lt;B&gt;Design&lt;/B&gt; tab in the Visual Studio IDE, you can view what the master page actually looks like. This is shown here in Figure 6. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws06.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws06.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 6. Master page&lt;/B&gt; 
&lt;P&gt;From this figure, you can see that Visual Studio will apply this look and feel to any content page that uses this master page (I will discuss this shortly). Also, you will find a collection of HTML server and Web server controls placed on the page. These controls include the &lt;B&gt;Menu&lt;/B&gt;, &lt;B&gt;SiteMapPath&lt;/B&gt;, and &lt;B&gt;LoginStatus&lt;/B&gt; controls. Probably the most interesting control on this page is the &lt;B&gt;ContentPlaceHolder&lt;/B&gt; control. 
&lt;P&gt;The &lt;B&gt;ContentPlaceHolder&lt;/B&gt; control is a defined area that allows for any content page that uses this particular master page to interject content into. Basically, when you construct your master pages, you are allowing content pages to use specified sections of the page. A content page will not be able to work outside the bounds of this content area. Though it is possible to include multiple content areas through the use of multiple &lt;B&gt;ContentPlaceHolder&lt;/B&gt; controls placed on the master page, this example (our &lt;CODE&gt;Default.master&lt;/CODE&gt; page) uses only one of these controls. 
&lt;P&gt;From this master page, you should modify the page either from the Design view shown in Visual Studio, or by directly changing the code of the page from the code view. What are you changing, exactly? Well, for instance, you will probably want to change the &lt;I&gt;Your Name Here&lt;/I&gt; parts to the name you want to give to the site. 
&lt;P&gt;On the &lt;CODE&gt;Default.master&lt;/CODE&gt; page, you can also see that there is a &lt;B&gt;SiteMapDataSource&lt;/B&gt; control at the bottom of the page. The &lt;B&gt;SiteMapDataSource&lt;/B&gt; control is one of the new data source controls that have been added to ASP.NET 2.0. This control is designed to work with any &lt;CODE&gt;web.sitemap&lt;/CODE&gt; files that are contained within your application. The &lt;CODE&gt;web.sitemap&lt;/CODE&gt; file is basically an XML representation of your application's page structure that can then be bound to a couple of site navigation controls that you will find at your disposal. In fact, the &lt;CODE&gt;Default.master&lt;/CODE&gt; page includes a couple of these new site navigation controls, one being the &lt;B&gt;Menu&lt;/B&gt; server control. This control is shown here in Listing 2. 
&lt;P&gt;&lt;B&gt;Listing 2. Looking at the Menu control&lt;/B&gt; &lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:menu&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="menua"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; 
  &lt;SPAN class=attr&gt;datasourceid&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="SiteMapDataSource1"&lt;/SPAN&gt; 
  &lt;SPAN class=attr&gt;cssclass&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="menua"&lt;/SPAN&gt; 
  &lt;SPAN class=attr&gt;orientation&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Horizontal"&lt;/SPAN&gt; 
  &lt;SPAN class=attr&gt;maximumdynamicdisplaylevels&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="0"&lt;/SPAN&gt; 
  &lt;SPAN class=attr&gt;skiplinktext&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;=""&lt;/SPAN&gt; 
  &lt;SPAN class=attr&gt;staticdisplaylevels&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="2"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;From this code, you can see that the &lt;B&gt;Menu&lt;/B&gt; control points to the &lt;CODE&gt;web.sitemap&lt;/CODE&gt; file by way of the &lt;B&gt;SiteMapDataSource1&lt;/B&gt; control on this page. This is done by using the &lt;CODE&gt;DataSourceId&lt;/CODE&gt; attribute in the &lt;B&gt;Menu&lt;/B&gt; control. An important attribute to pay attention to in this control is the &lt;CODE&gt;Orientation&lt;/CODE&gt; attribute, which specifies that the links should be laid out horizontally. Also, note the use of the &lt;CODE&gt;StaticDisplayLevels&lt;/CODE&gt; attribute and the fact that it is only set to a value of 2, so that only the first two layers of links will be displayed (Home being the first layer and Resume, Links, and Albums being the second layer). 
&lt;P&gt;Besides the &lt;B&gt;Menu&lt;/B&gt; control on this page, there is also the &lt;B&gt;SiteMapPath&lt;/B&gt; control, which is also using the data found in the &lt;CODE&gt;web.sitemap&lt;/CODE&gt; file. When generated and if the end user browses to one of the sub-pages, you can see how this control uses what is called bread-crumb navigation on the page to inform the user where in the application they reside. This is illustrated here in Figure 7. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws07.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws07.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 7. Bread-crumb navigation&lt;/B&gt; 
&lt;P&gt;The interesting thing about this control is that it is not associated with the &lt;CODE&gt;web.sitemap&lt;/CODE&gt; file through the use of the &lt;B&gt;SiteMapDataSource&lt;/B&gt; control. Instead, this control directly binds itself to the &lt;CODE&gt;web.sitemap&lt;/CODE&gt; file automatically. In terms of customizing this control, one attribute that is easily modifiable is the &lt;CODE&gt;PathSeparator&lt;/CODE&gt; attribute, which specifies the character that is used between each of the page levels. 
&lt;P&gt;As far as modifying the &lt;CODE&gt;Default.master&lt;/CODE&gt; page, let's stop there and move onto some of the other components of the site. 
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;The Configuration Page: Web.config&lt;/H4&gt;
&lt;P&gt;Having a &lt;CODE&gt;web.config&lt;/CODE&gt; file within an ASP.NET application is nothing new; what is new is all the new features provided by ASP.NET 2.0 that have been made configurable through this XML configuration file. 
&lt;P&gt;You can make the biggest modification to the look and feel of your site by changing the theme of the application. Looking at the &lt;CODE&gt;web.config&lt;/CODE&gt; file, you can see that the theme of any page generated is using a theme called &lt;I&gt;White&lt;/I&gt;. &lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;pages&lt;/SPAN&gt; &lt;SPAN class=attr&gt;styleSheetTheme&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="White"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;If you look in the Solution Explorer, you will see a folder called App_Themes. Inside this folder there are two themes that have been consolidated into two folders—Black and White. By default, the Personal Web Site Starter Kit will use the White theme. 
&lt;P&gt;A theme contains the styling for the application. Themes can be applied at a control, page, or site level. In the case of this starter kit though, the theme is applied application-wide through the specification made in the &lt;CODE&gt;web.config&lt;/CODE&gt; file. If you open up one of the theme folders, you will notice that both the Black and White themes are made up of not only &lt;CODE&gt;.css&lt;/CODE&gt; files, but also &lt;CODE&gt;.skin&lt;/CODE&gt; files and images. A &lt;CODE&gt;.skin&lt;/CODE&gt; file defines the styling that is applied to server controls through the use of their attributes. 
&lt;P&gt;Changing the theme of the page is as simple as changing the value of the &lt;CODE&gt;styleSheetTheme&lt;/CODE&gt; attribute in the &lt;CODE&gt;web.config&lt;/CODE&gt; file as shown here: &lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;pages&lt;/SPAN&gt; &lt;SPAN class=attr&gt;styleSheetTheme&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Black"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;Both the Black and White themes of the Personal Web Site Starter Kit are represented here in Figure 8. 
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws08L.gif" mce_href="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws08L.gif"&gt;&lt;IMG alt="Click for larger image " src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws08S.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws08S.gif"&gt;&lt;/A&gt; 
&lt;P&gt;&lt;B&gt;Figure 8. Comparing themes (click to enlarge)&lt;/B&gt; 
&lt;P&gt;To modify the overall appearance of the application, you can either choose one of the predefined themes or you can create your own theme. To do this, simply create a new theme folder in the App_Themes directory and create your own &lt;CODE&gt;.css&lt;/CODE&gt;, &lt;CODE&gt;.skin&lt;/CODE&gt;, and images. Then you can either change the theme for an individual page using the &lt;CODE&gt;Theme&lt;/CODE&gt; attribute in the &lt;CODE&gt;@Page&lt;/CODE&gt; directive, or you can globally change the theme in your entire application through the use of the &lt;CODE&gt;styleSheetTheme&lt;/CODE&gt; attribute in the &lt;CODE&gt;&amp;lt;pages&amp;gt;&lt;/CODE&gt; element of the &lt;CODE&gt;web.config&lt;/CODE&gt; file. 
&lt;P&gt;Now let's take a look at the &lt;CODE&gt;&amp;lt;location&amp;gt;&lt;/CODE&gt; section at the bottom of the &lt;CODE&gt;web.config&lt;/CODE&gt; file. &lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;location&lt;/SPAN&gt; &lt;SPAN class=attr&gt;path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Admin"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
   &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;system.web&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
      &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;authorization&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;allow&lt;/SPAN&gt; &lt;SPAN class=attr&gt;roles&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Administrators"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
         &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;deny&lt;/SPAN&gt; &lt;SPAN class=attr&gt;users&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="*"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
      &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;authorization&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
   &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;system.web&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;location&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;In most cases, developers apply settings to the &lt;CODE&gt;web.config&lt;/CODE&gt; file as a means of applying a configuration setting to everything contained within the application as a whole. Note though that through the use of the &lt;CODE&gt;&amp;lt;location&amp;gt;&lt;/CODE&gt; element in the &lt;CODE&gt;web.config&lt;/CODE&gt; file, you can also control the configurations applied to folders or even specific pages contained within the application that are outside the realm of configurations that were applied to the application as a whole. 
&lt;P&gt;The section shown above is defining specific configuration settings for the Admin folder of the Personal Web Site application. This means that everything defined here is defined to each and every file contained within the Admin folder. The settings applied, through the use of the &lt;CODE&gt;&amp;lt;authorization&amp;gt;&lt;/CODE&gt; element, will allow only authenticated users who are in the Administrators role to view the content. If a user is found outside of the Administrators role, then they will be locked out from viewing any of the pages contained in this folder. 
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;The First Content Page: Default.aspx&lt;/H4&gt;
&lt;P&gt;Looking at the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page, you will notice that it isn't your standard &lt;CODE&gt;.aspx&lt;/CODE&gt; page. This is a content page. This page, like most in this application, uses a master page as a template. Let's look at the basic structure of this page, as shown in Listing 3. 
&lt;P&gt;&lt;B&gt;Listing 3. The structure of the Default.aspx page&lt;/B&gt; &lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&amp;lt;%@   Page Language=&lt;SPAN class=str&gt;"VB"&lt;/SPAN&gt; MasterPageFile=&lt;SPAN class=str&gt;"~/Default.master"&lt;/SPAN&gt; 
            Title=&lt;SPAN class=str&gt;"Your Name Here | Home"&lt;/SPAN&gt;
   CodeFile=&lt;SPAN class=str&gt;"Default.aspx.vb"&lt;/SPAN&gt; Inherits=&lt;SPAN class=str&gt;"Default_aspx"&lt;/SPAN&gt; %&amp;gt;

&amp;lt;asp:content id=&lt;SPAN class=str&gt;"Content1"&lt;/SPAN&gt; contentplaceholderid=&lt;SPAN class=str&gt;"Main"&lt;/SPAN&gt; runat=&lt;SPAN class=str&gt;"server"&lt;/SPAN&gt;&amp;gt;

&amp;lt;/asp:content&amp;gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;All &lt;CODE&gt;.aspx&lt;/CODE&gt; pages that are meant to be content pages use the &lt;CODE&gt;MasterPageFile&lt;/CODE&gt; attribute in the &lt;CODE&gt;@Page&lt;/CODE&gt; directive. From Listing 3, you can see that the &lt;CODE&gt;MasterPageFile&lt;/CODE&gt; attribute points to the &lt;CODE&gt;Default.master&lt;/CODE&gt; page. This is the page template from which this content page will inherit. 
&lt;P&gt;Since this is a content page, you will not need to include any of the standard HTML tags (such as the opening and closing &lt;CODE&gt;&amp;lt;html&amp;gt;&lt;/CODE&gt;, &lt;CODE&gt;&amp;lt;body&amp;gt;&lt;/CODE&gt;, and &lt;CODE&gt;&amp;lt;form&amp;gt;&lt;/CODE&gt; tags), because these are defined in the master page and there is thus no need to repeat the tag representation. What is included is a single &lt;B&gt;Content&lt;/B&gt; server control. This control binds itself to the single &lt;B&gt;ContentPlaceHolder&lt;/B&gt; control that was used on the master page. The association between the two controls is done by using the &lt;CODE&gt;ContentPlaceHolderID&lt;/CODE&gt; attribute within the &lt;B&gt;Content&lt;/B&gt; control. In Listing 3 you can see that the value of the &lt;CODE&gt;ContentPlaceHolderId&lt;/CODE&gt; attribute is &lt;CODE&gt;Main&lt;/CODE&gt;, which you will find to be the value of the &lt;CODE&gt;ID&lt;/CODE&gt; attribute from the &lt;B&gt;ContentPlaceHolder&lt;/B&gt; control on the master page. It is within this &lt;B&gt;Content&lt;/B&gt; control where the entire page's content is defined. If you end up adding additional &lt;B&gt;ContentPlaceHolder&lt;/B&gt; controls on the master page, then you can also bind to these instances by adding additional &lt;B&gt;Content&lt;/B&gt; controls on the content page. 
&lt;P&gt;The nice thing about using a content page with a master page is that you can work with it in Visual Web Developer 2005 Express Edition. Clicking the Design view of the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page, you will see the following view of the page. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws09.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws09.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 9. Design view&lt;/B&gt; 
&lt;P&gt;From this figure, you can see that the contents that were defined in the master page are shown in gray, while the sections that are modifiable from the content page are shown in the standard white or clear view. 
&lt;P&gt;The &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page is the home page of the application. The first thing you can do here to personalize the application is to replace all the &lt;I&gt;lorem ipsum&lt;/I&gt; text with meaningful text. All the &lt;I&gt;lorem ipsum&lt;/I&gt; text on this page is hard-coded text and is not data-driven, so you will just need to change this text directly in the &lt;CODE&gt;.aspx&lt;/CODE&gt; page itself. 
&lt;P&gt;The interesting thing about this page is that it includes some the more exciting pieces of ASP.NET 2.0. The page's left-hand column is defined at the top of the page. The first control defined here is a &lt;B&gt;LoginView&lt;/B&gt; control. Since we are working with an application that will allow users to log in to the application, this page will have viewers who are considered authenticated and authorized users (meaning that they have logged into the application and were authorized for a specific role). This page will also have viewers who have not gone through the authentication and authorization process. Because of these dynamics, there will be scenarios in which you will display specific data for authenticated users while displaying other content to users who are not authenticated. The &lt;B&gt;LoginView&lt;/B&gt; control allows for this kind of behavior. 
&lt;P&gt;The &lt;B&gt;LoginView&lt;/B&gt; control has two templates, &lt;CODE&gt;&amp;lt;AnonymousTemplate&amp;gt;&lt;/CODE&gt; and &lt;CODE&gt;&amp;lt;LoggedInTemplate&amp;gt;&lt;/CODE&gt;. Looking at the code from &lt;CODE&gt;Default.aspx&lt;/CODE&gt;, you can see that the AnonymousTemplate section includes a form that allows the end user to attempt to log in to the application. If the user is authenticated after logging into the application, they will then be presented with the contents provided in the &lt;CODE&gt;LoggedInTemplate&lt;/CODE&gt; section. This section only contains some text and a &lt;B&gt;LoginName&lt;/B&gt; control. The &lt;B&gt;LoginName&lt;/B&gt; control is used simply to present the name of the authenticated user. An example of both of these views is presented in Figure 10. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws10.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws10.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 10. Unauthenticated vs. authenticated view&lt;/B&gt; 
&lt;P&gt;Below the login form, you will find a &lt;B&gt;FormView&lt;/B&gt; control, which presents a random photo from a random album. The &lt;B&gt;FormView&lt;/B&gt; control will get this picture and associated data from the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page's &lt;B&gt;ObjectDataSouce&lt;/B&gt; control (you will find this control at the bottom of the page). The code for the &lt;B&gt;ObjectDataSource&lt;/B&gt; control is shown here in Listing 4. 
&lt;P&gt;&lt;B&gt;Listing 4. The ObjectDataSource control&lt;/B&gt; &lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ObjectDataSource&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="ObjectDataSource1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; 
  &lt;SPAN class=attr&gt;TypeName&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="PhotoManager"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;SelectMethod&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="GetPhotos"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ObjectDataSource&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;The &lt;B&gt;ObjectDataSource&lt;/B&gt; control is meant to retrieve data from a middle-tier component. In this case, the &lt;B&gt;ObjectDataSource1&lt;/B&gt; control uses the &lt;CODE&gt;TypeName&lt;/CODE&gt; attribute to point to a class called &lt;CODE&gt;PhotoManager&lt;/CODE&gt; and a method contained within this class called &lt;CODE&gt;GetPhotos&lt;/CODE&gt;. You will actually find this class within the App_Code folder of your application. So, what happens is that when the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page is requested, the &lt;CODE&gt;PhotoManager&lt;/CODE&gt; class is invoked by the &lt;B&gt;ObjectDataSource&lt;/B&gt; control, which then binds the provided information using simple binding syntax such as &lt;CODE&gt;&amp;lt;% Eval("AlbumID") %&amp;gt;&lt;/CODE&gt;. 
&lt;P&gt;To create a thumbnail of the image on the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page, a custom http handler is employed. The http handler is used from an HTML &lt;CODE&gt;&amp;lt;img&amp;gt;&lt;/CODE&gt; element, as illustrated here in Listing 5. 
&lt;P&gt;&lt;B&gt;Listing 5. Using the http handler for the images&lt;/B&gt; &lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;img&lt;/SPAN&gt; &lt;SPAN class=attr&gt;src&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Handler.ashx?PhotoID=&amp;lt;%# Eval("&lt;/SPAN&gt;&lt;SPAN class=attr&gt;PhotoID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;") %&amp;gt;&amp;amp;Size=M"&lt;/SPAN&gt; 
 &lt;SPAN class=attr&gt;class&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="photo_198"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;style&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="border:4px solid white"&lt;/SPAN&gt; 
 &lt;SPAN class=attr&gt;alt&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;='Photo Number &amp;lt;%# Eval("PhotoID") %&amp;gt;'&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;From this example, you can see that the actual image is retrieved from the http handler &lt;CODE&gt;Handler.ashx&lt;/CODE&gt;. You will also find this file contained within your application. Review this file as an example of how you can use your own http handlers from an ASP.NET page. 
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Including Your Resume Using Resume.aspx&lt;/H4&gt;
&lt;P&gt;The starter kit's resume page is another content page. Pulling up this page in the browser, you will see that this page uses the same master page that is used by the &lt;CODE&gt;Default.aspx&lt;/CODE&gt; page. 
&lt;P&gt;The &lt;CODE&gt;Resume.aspx&lt;/CODE&gt; page is a page that allows you to present your resume (also known as &lt;I&gt;curriculum vitae&lt;/I&gt; or simply CV). Besides being a content page, this page simply contains a collection of static images and text, all of which are contained within the page's &lt;B&gt;Content&lt;/B&gt; server control. 
&lt;P&gt;To customize this page by adding your resume to it, simply replace the &lt;I&gt;lorem ipsum&lt;/I&gt; text with your own. For the image, place a picture of yourself in the Images folder of the application and point to this new picture from the page's &lt;CODE&gt;&amp;lt;img&amp;gt;&lt;/CODE&gt; HTML element. &lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;img&lt;/SPAN&gt; &lt;SPAN class=attr&gt;src&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="images/resume-evjen.jpg"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;class&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="photo_198"&lt;/SPAN&gt; 
&lt;SPAN class=attr&gt;style&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="border:4px solid white"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;alt&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Resume Photo"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Your Links to the World: Links.aspx&lt;/H4&gt;
&lt;P&gt;Another basic page is the &lt;CODE&gt;Links.aspx&lt;/CODE&gt; page. This page is another content page that uses &lt;CODE&gt;Default.master&lt;/CODE&gt;. This page is simply a list of links that are organized into categories such as Top 5, Cool Site Designs, Photo Sites, and Resources. 
&lt;P&gt;You can edit the &lt;CODE&gt;Links.aspx&lt;/CODE&gt; page to customize the categories and the links that are presented on this page. 
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Picture This: Albums.aspx&lt;/H4&gt;
&lt;P&gt;One of the big areas of focus for the Personal Web Site Starter Kit is the photo album system that it contains. Clicking the Album page will bring you to &lt;CODE&gt;Albums.aspx&lt;/CODE&gt;. The default view of this page is shown here in Figure 11. 
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws11L.gif" mce_href="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws11L.gif"&gt;&lt;IMG alt="Click for larger image" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws11S.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws11S.gif"&gt;&lt;/A&gt; 
&lt;P&gt;&lt;B&gt;Figure 11. Photo Gallery home page (click for larger image)&lt;/B&gt; 
&lt;P&gt;The photo album system included in this application allows you to display all your personal pictures in custom albums. Included in the default view is a single album for demonstration purposes. This album view shows the first picture in the album as well as showing the number of photos that are included in the album. Clicking the album name (which is a hyperlink) will bring you to a page that displays the pictures contained in the album. This is illustrated here in Figure 12. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws12.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws12.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 12. Photo album&lt;/B&gt; 
&lt;P&gt;From this figure, you can see each of the photos in the album is represented with a thumbnail image of the larger image. Also included is the name of the picture. Clicking on one of the images will open the larger image. This is shown here in Figure 13. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws13.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws13.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 13. Displaying a photo&lt;/B&gt; 
&lt;P&gt;When viewing a single image, you will notice that there is a navigation system provided. This image navigation system is defined here in the following figure. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws14.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws14.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 14. Navigating the photos&lt;/B&gt; 
&lt;P&gt;This page also includes a &lt;B&gt;download photo&lt;/B&gt; button. Clicking this button will take you to a page that will show the image in its actual size. The viewer is asked to right-click the image in order to save it to disk. 
&lt;P&gt;A personalized &lt;CODE&gt;Albums.aspx&lt;/CODE&gt; page is shown in Figure 15. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws15.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws15.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 15. Personalized album&lt;/B&gt; 
&lt;P&gt;Like the home page of the site, which uses an &lt;B&gt;ObjectDataSource&lt;/B&gt; control to get a random picture from a random album to display as the picture of the day, the &lt;CODE&gt;Albums.aspx&lt;/CODE&gt; page uses an &lt;B&gt;ObjectDataSource&lt;/B&gt; control to get a list of albums (plus the first picture from the album) to display. &lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ObjectDataSource&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="ObjectDataSource1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt; 
  &lt;SPAN class=attr&gt;TypeName&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="PhotoManager"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;SelectMethod&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="GetAlbums"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ObjectDataSource&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;In this case, the &lt;B&gt;ObjectDataSource1&lt;/B&gt; control is using the same class, &lt;CODE&gt;PhotoManager&lt;/CODE&gt;, but instead is using the &lt;CODE&gt;GetAlbums&lt;/CODE&gt; method to retrieve this list of albums. The &lt;CODE&gt;GetAlbums&lt;/CODE&gt; method is shown here in Listing 6. 
&lt;P&gt;&lt;B&gt;Listing 6. The GetAlbums method &lt;/B&gt;
&lt;P&gt;&lt;B&gt;Visual Basic&lt;/B&gt; &lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;Public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;Function&lt;/SPAN&gt; GetAlbums() &lt;SPAN class=kwrd&gt;As&lt;/SPAN&gt; Generic.List(Of Album)
    command.CommandText = &lt;SPAN class=str&gt;"GetAlbums"&lt;/SPAN&gt;
    command.Parameters.Add(&lt;SPAN class=kwrd&gt;New&lt;/SPAN&gt; SqlParameter(&lt;SPAN class=str&gt;"@IsPublic"&lt;/SPAN&gt;, filter))

    &lt;SPAN class=kwrd&gt;Dim&lt;/SPAN&gt; reader &lt;SPAN class=kwrd&gt;As&lt;/SPAN&gt; SqlDataReader = command.ExecuteReader()
    &lt;SPAN class=kwrd&gt;Dim&lt;/SPAN&gt; list &lt;SPAN class=kwrd&gt;As&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;New&lt;/SPAN&gt; Generic.List(Of Album)()
    &lt;SPAN class=kwrd&gt;Do&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;While&lt;/SPAN&gt; (reader.Read())
    &lt;SPAN class=kwrd&gt;Dim&lt;/SPAN&gt; temp &lt;SPAN class=kwrd&gt;As&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;New&lt;/SPAN&gt; Album(&lt;SPAN class=kwrd&gt;CInt&lt;/SPAN&gt;(reader(&lt;SPAN class=str&gt;"AlbumID"&lt;/SPAN&gt;)), &amp;amp; _
    &lt;SPAN class=kwrd&gt;CInt&lt;/SPAN&gt;(reader(&lt;SPAN class=str&gt;"NumberOfPhotos"&lt;/SPAN&gt;)), &amp;amp; _
     &lt;SPAN class=kwrd&gt;CStr&lt;/SPAN&gt;(reader(&lt;SPAN class=str&gt;"Caption"&lt;/SPAN&gt;)), &lt;SPAN class=kwrd&gt;CBool&lt;/SPAN&gt;(reader(&lt;SPAN class=str&gt;"IsPublic"&lt;/SPAN&gt;)))
        list.Add(temp)
    &lt;SPAN class=kwrd&gt;Loop&lt;/SPAN&gt;

    &lt;SPAN class=kwrd&gt;Return&lt;/SPAN&gt; list
&lt;SPAN class=kwrd&gt;End&lt;/SPAN&gt; Function&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;&lt;B&gt;Visual C#&lt;/B&gt; &lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;public&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;static&lt;/SPAN&gt; List&amp;lt;Album&amp;gt; GetAlbums() 
{
    &lt;SPAN class=kwrd&gt;using&lt;/SPAN&gt; (SqlCommand command = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; SqlCommand(&lt;SPAN class=str&gt;"GetAlbums"&lt;/SPAN&gt;, connection))
    {
        command.Parameters.Add(&lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; SqlParameter(&lt;SPAN class=str&gt;"@IsPublic"&lt;/SPAN&gt;, filter));

        &lt;SPAN class=kwrd&gt;using&lt;/SPAN&gt; (SqlDataReader reader = command.ExecuteReader())
        {
            &lt;SPAN class=kwrd&gt;while&lt;/SPAN&gt; (reader.Read())
            {
                Album temp = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Album(
                    (&lt;SPAN class=kwrd&gt;int&lt;/SPAN&gt;)reader[&lt;SPAN class=str&gt;"AlbumID"&lt;/SPAN&gt;],
                    (&lt;SPAN class=kwrd&gt;int&lt;/SPAN&gt;)reader[&lt;SPAN class=str&gt;"NumberOfPhotos"&lt;/SPAN&gt;],
                    (&lt;SPAN class=kwrd&gt;string&lt;/SPAN&gt;)reader[&lt;SPAN class=str&gt;"Caption"&lt;/SPAN&gt;],
                    (&lt;SPAN class=kwrd&gt;bool&lt;/SPAN&gt;)reader[&lt;SPAN class=str&gt;"IsPublic"&lt;/SPAN&gt;]);
                list.Add(temp);
             }
        }
        &lt;SPAN class=kwrd&gt;return&lt;/SPAN&gt; list;

    }
}&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;From this bit of code, you can see that the &lt;CODE&gt;GetAlbums&lt;/CODE&gt; method takes no input parameters and returns a generic list of &lt;CODE&gt;Albums&lt;/CODE&gt;. The &lt;CODE&gt;Albums&lt;/CODE&gt; type is defined in the &lt;CODE&gt;ObjectTypes.vb&lt;/CODE&gt; or &lt;CODE&gt;ObjectTypes.cs&lt;/CODE&gt; file, which you will also find in the App_Code folder. Once each album is retrieved from the database, some of the album details are presented through the use of some declarative binding, as shown here: &lt;PRE&gt;&lt;/PRE&gt;&lt;PRE class=csharpcode&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;h4&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt; &lt;SPAN class=attr&gt;href&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Photos.aspx?AlbumID=&amp;lt;%# Eval("&lt;/SPAN&gt;&lt;SPAN class=attr&gt;AlbumID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;") %&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=asp&gt;&amp;lt;%&lt;/SPAN&gt;# Server.HtmlEncode(Eval(&lt;SPAN class=str&gt;"Caption"&lt;/SPAN&gt;).ToString()) &lt;SPAN class=asp&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;h4&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=asp&gt;&amp;lt;%&lt;/SPAN&gt;# Eval(&lt;SPAN class=str&gt;"Count"&lt;/SPAN&gt;) &lt;SPAN class=asp&gt;%&amp;gt;&lt;/SPAN&gt; Photo(s)
&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/STYLE&gt;

&lt;P&gt;From these statements, you can see that the &lt;CODE&gt;AlbumID&lt;/CODE&gt; and the &lt;CODE&gt;Caption&lt;/CODE&gt; are used to construct a hyperlink to the album details. Then the &lt;CODE&gt;Count&lt;/CODE&gt; property is used to provide a count of the number of images that the album contains. 
&lt;BLOCKQUOTE&gt;&lt;B&gt;&lt;B&gt;Note&lt;/B&gt; &lt;/B&gt;On a side note, the &lt;CODE&gt;GetAlbums&lt;/CODE&gt; method is a nice example of the new generics capabilities provided by the .NET Framework 2.0. Generics allow you to make a strongly typed collection that allows you to avoid the process of boxing and unboxing, which is what occurs when working with collections outside of collections that are based upon generics. You will find that generic collections are easier to work with and provide better performance.&lt;/BLOCKQUOTE&gt;
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Administering Your Own Albums&lt;/H4&gt;
&lt;P&gt;If you logged into the Personal Web Site Starter Kit as a user defined under the Administrators role, you will notice that there is an additional accessible page found in the navigation structure of the application. The name of this page is Manage and is shown here in Figure 16. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws16.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws16.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 16. Administering your albums&lt;/B&gt; 
&lt;P&gt;Clicking on the Manage page will take you to a page found in &lt;CODE&gt;Admin\Albums.aspx&lt;/CODE&gt;. This &lt;CODE&gt;Albums.aspx&lt;/CODE&gt; page allows you to administer the albums that are presented through your application. This page is shown in Figure 17. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws17.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws17.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 17. Creating a new album&lt;/B&gt; 
&lt;P&gt;From this view, you can see that the sample album is shown in the list of albums. You can rename, edit, or delete each listed album. Feel free to delete the sample album as we are going to add our own. 
&lt;P&gt;To add a new album, provide a name for the album in the text box of the &lt;B&gt;Add New Album&lt;/B&gt; section of the page. You will need to decide whether or not this album is going to be a public, viewable album or if it is going to be an album that is considered private. Later, we will cover what it means for an album to be private. 
&lt;P&gt;To add images to your new album, click the &lt;B&gt;Edit&lt;/B&gt; button from the list of albums. This will pull up a detailed view of the album (shown here in Figure 18). 
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws18L.gif" mce_href="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws18L.gif"&gt;&lt;IMG alt="Click for larger image" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws18S.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws18S.gif"&gt;&lt;/A&gt; 
&lt;P&gt;&lt;B&gt;Figure 18. Setting details information (click for larger image)&lt;/B&gt; 
&lt;P&gt;From this page, you can add a new image to the album as well as provide a name for the image that will be displayed to the viewer. After these values are provided, simply click the &lt;B&gt;Add&lt;/B&gt; button and you will see the image listed in the album. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws19.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws19.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 19. Adding photos&lt;/B&gt; 
&lt;P&gt;Not only can you add single images one at a time in this manner, but you can also add numerous images at once by copying the images to the Uploads folder that you will find in the application. Once you have copied all the images you are interested in placing in the album in the Uploads folder, go back to the manager view of the album and click the &lt;B&gt;Import&lt;/B&gt; button from the left column. This will move the images to the database for storage. After the images are moved to the database, you will see the images listed in the album page as shown in Figure 20. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws20.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws20.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 20. After adding new images&lt;/B&gt; 
&lt;P&gt;Note that after you have moved the images from the Uploads folder to the database, you should then delete the images you placed in the Uploads folder, since clicking the &lt;B&gt;Import&lt;/B&gt; button again will simply upload the images for a second time and you will have two copies of each image in your folder. 
&lt;P&gt;After the images are uploaded to the database and are included in your album, if you used the bulk upload you will notice that the name used for each image is simply the name of the file. You may wish to rename each of the images to something a little more meaningful. To accomplish this task, simply click the &lt;B&gt;Rename&lt;/B&gt; button next to the photo and you will then be presented with a text box that enables you to rename the file. This is shown in Figure 21. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws21.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws21.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 21. Renaming a photo&lt;/B&gt; 
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Registering Users: Register.aspx&lt;/H4&gt;
&lt;P&gt;Clicking on the Register link in the navigation of the application, viewers will be directed to a page that will allow them to register for the application. This page can also be accessed when a viewer clicks the &lt;B&gt;Create Account&lt;/B&gt; button on the home page. The &lt;CODE&gt;Register.aspx&lt;/CODE&gt; page is presented in Figure 22. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws22.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws22.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 22. Requesting a new account&lt;/B&gt; 
&lt;P&gt;What are users actually registering for? The viewer who has registered will find that once the registration is complete they will not have any new access capabilities. Instead, they will first have to be activated for more privileges by a user in the Administrator role. 
&lt;P&gt;There are two roles in the Personal Web Site Starter Kit—Administrators and Friends—both of which warrant a little more definition. 
&lt;P&gt;An individual who is considered an administrator will be able to manage the application. This means that a user in this role will be able to create new albums and photos, delete albums and photos, rename items, and decide whether any of these items are public or private. Administrators also have the ability to manage the application's registered users. Administrators can add and delete users from the Administrator role as well as add or delete users from the Friends role. 
&lt;P&gt;A user who is defined as being in the Friends role will not be able to manage any of the items that are mentioned above. Instead, users defined in the Friends role will be able to view the albums that are earmarked as private. 
&lt;P&gt;Albums that are earmarked as private are viewable only by users who are in the Administrators or Friends role. Unauthenticated users will not be able to view any albums that are not marked public. 
&lt;P&gt;When users register for your personal web site they will be placed in the list of users found in the ASP.NET Web Site Administration Tool. You can get to this tool by clicking the &lt;I&gt;ASP.NET Web Site Administration Tool&lt;/I&gt; link from the Users and Settings section of the Manage page in the application. The other way to pull up this page is to click the appropriate button in the Visual Studio Solution Explorer or by selecting &lt;B&gt;Website&lt;/B&gt;, then selecting &lt;B&gt;ASP.NET Configuration&lt;/B&gt;. 
&lt;P&gt;When this configuration tool opens, select the &lt;B&gt;Security&lt;/B&gt; tab. From the security page, select the &lt;I&gt;Manage users&lt;/I&gt; link. You will then be presented with a list of registered users. An example of this is presented in Figure 23. 
&lt;P&gt;&lt;IMG alt="" src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws23.gif" border=0 mce_src="http://msdn.microsoft.com/library/en-us/dnaspp/html/pws23.gif"&gt; 
&lt;P&gt;&lt;B&gt;Figure 23. Listing users&lt;/B&gt; 
&lt;P&gt;From this page, you can edit or delete users. Right away, you can see whether the user you are working with is considered active in the application. &lt;I&gt;Active&lt;/I&gt; means that their login (their defined username and password) will work in order to get authenticated and authorized for the application. Checking the check box next to the user will make them active. Clearing (unchecking) the checkbox will turn off the user's active status. 
&lt;P&gt;If someone has registered for your application, they are essentially asking to be considered to be in the Administrators or the Friends role. If you are interested in assigning them to one of these roles, click on the &lt;I&gt;Edit roles&lt;/I&gt; link next to their name and select the appropriate role. If they are then considered an active user and in the role of Friends, the next time they log into the application, they will be able to see all the albums that are earmarked as private, which unauthenticated users will be unable to do. 
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Summary&lt;/H4&gt;
&lt;P&gt;The Personal Web Site Starter Kit is both valuable and fun for a several reasons. First, it allows you to quickly and easily create a Web site that contains some personal information about yourself. Second and more importantly, this starter kit shows off some of the new capabilities found in ASP.NET 2.0 as well as some new features provided by the underlying .NET Framework 2.0. 
&lt;P&gt;From generics to new controls, there is a lot to learn from this application. Some of the more important items to pay attention to are the new membership and role management systems that ASP.NET 2.0 provides. These new security systems allow for you to easily manage access to your application and to not only authenticate users in a general fashion, but to also place the authenticated user in a particular role that will have different access rights. 
&lt;P&gt;The idea of this starter kit is not to use it as is, but instead to customize it heavily. You needn't limit yourself to just changing the &lt;I&gt;lorem ipsum&lt;/I&gt; text, but instead you should look at how to add additional roles, privileges, new pages, and new capabilities. Have fun and happy coding! 
&lt;H4&gt;&lt;A&gt;&lt;/A&gt;Related Books&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;B&gt;Bill Evjen,&lt;/B&gt; &lt;A href="http://shopping.msn.com/search/detail.aspx?pcId=12175&amp;amp;prodId=2184857&amp;amp;ptnrid=141&amp;amp;ptnrdata=0" mce_href="http://shopping.msn.com/search/detail.aspx?pcId=12175&amp;amp;prodId=2184857&amp;amp;ptnrid=141&amp;amp;ptnrdata=0"&gt;ASP.NET 2.0 Beta Preview&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=913450" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/coding4fun/archive/tags/starter+kit/default.aspx">starter kit</category><category domain="http://blogs.msdn.com/coding4fun/archive/tags/web/default.aspx">web</category></item></channel></rss>