<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PeterKellner.net &#187; Code Camp Web Site Series</title>
	<atom:link href="http://peterkellner.net/category/code-camp-web-site-series/feed/" rel="self" type="application/rss+xml" />
	<link>http://peterkellner.net</link>
	<description>Microsoft Focused, JavaScript,HTML5 (ExtJS, SenchaTouch &#38; Windows 8 Metro)</description>
	<lastBuildDate>Fri, 11 May 2012 16:43:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>New Awesome Session Interest Viewer On Silicon Valley Code Camp Web Site</title>
		<link>http://peterkellner.net/2011/06/11/new-awesome-session-interest-viewer-on-silicon-valley-code-camp-web-site/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-awesome-session-interest-viewer-on-silicon-valley-code-camp-web-site</link>
		<comments>http://peterkellner.net/2011/06/11/new-awesome-session-interest-viewer-on-silicon-valley-code-camp-web-site/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 14:29:09 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Code Camp]]></category>
		<category><![CDATA[Code Camp Web Site Series]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[ExtJS]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2011/06/11/new-awesome-session-interest-viewer-on-silicon-valley-code-camp-web-site/</guid>
		<description><![CDATA[Checkout the new session viewer we put together for Silicon Valley Code Camp.&#160; Using one of the very cool Sencha demonstration pages (Forms Dashboard), we build a page that let’s you easily navigate all the sessions as well as express interest in attending them.&#160; Come read about it as well as play with it. You [...]]]></description>
			<content:encoded><![CDATA[<p>Checkout the new <a href="http://www.siliconvalley-codecamp.com/SessionInterestChart.aspx">session viewer</a> we put together for <a href="http://www.siliconvalley-codecamp.com/">Silicon Valley Code Camp</a>.&#160; Using one of the very cool <a href="http://www.sencha.com/">Sencha</a> demonstration pages (<a href="http://dev.sencha.com/deploy/ext-4.0.2/examples/charts/FormDashboard.html">Forms Dashboard</a>), we build a page that let’s you easily navigate all the sessions as well as express interest in attending them.&#160; Come read about it as well as play with it. You don’t have to be logged in, but then you miss half the fun (selecting interest in sessions).&#160; The source code is right under your mouse. Press View Source once you are on the page and you’ll see how simple it was to build.</p>
<p>Also, if you have not registered for our code camp, being hold October 8th and 9th at <a href="http://www.foothill.fhda.edu/index.php">Foothill College</a> for the 6th year in a row, please do so now at our <a href="http://www.siliconvalley-codecamp.com/Register.aspx">registration page</a>.</p>
<p>Blogged <a href="http://blog.siliconvalley-codecamp.com/2011/06/11/a-new-page-for-showing-interest-in-sessions-and-counts-up/">here</a> and available <a href="http://siliconvalley-codecamp.com/SessionInterestChart.aspx">here</a></p>
<p>&#160;</p>
<p><a href="http://blog.siliconvalley-codecamp.com/2011/06/11/a-new-page-for-showing-interest-in-sessions-and-counts-up/"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/06/image8.png" width="515" height="483" /></a></p>
<p>Let us know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2011/06/11/new-awesome-session-interest-viewer-on-silicon-valley-code-camp-web-site/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Bravo for ORCSWeb! On so many fronts</title>
		<link>http://peterkellner.net/2009/07/27/orcsweb-hosting-company-awesome-review/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=orcsweb-hosting-company-awesome-review</link>
		<comments>http://peterkellner.net/2009/07/27/orcsweb-hosting-company-awesome-review/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 19:59:07 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[ASP.NET 3.5]]></category>
		<category><![CDATA[Code Camp Web Site Series]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[Sql Server]]></category>
		<category><![CDATA[Sql Server 2008]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2009/07/27/orcsweb-hosting-company-awesome-review/</guid>
		<description><![CDATA[Many of you know of ORCSWeb either by reputation, or by way of Scott Forsyth, one of my ASP.NET MVP brothers.&#160; In case you don’t, they are a managed hosting solutions company specializing in Microsoft technologies.&#160; I’ve used their basic services for quite a while and have always been very happy.&#160; It has always seemed [...]]]></description>
			<content:encoded><![CDATA[<p>Many of you know of <a href="http://www.orcsweb.com/">ORCSWeb</a> either by reputation, or by way of <a href="http://weblogs.asp.net/owscott/default.aspx">Scott Forsyth</a>, one of my ASP.NET MVP brothers.&#160; In case you don’t, they are a managed hosting solutions company specializing in Microsoft technologies.&#160; I’ve used their basic services for quite a while and have always been very happy.&#160; It has always seemed that anytime I’ve called them (and it always seems like the middle of the night) one of their tech support staff is always available to help me, and go the extra mile if necessary.</p>
<p>The company I’m now working at is small and we don’t have a lot of resources to maintain hardware and do operating system type support.&#160; We do have a high load requirement so we need a very robust supported solution.&#160; Before this, I’d always been in the under $50 per month type plan with ORCSWeb, but I decided I needed more servers and a higher level of support.&#160; I really did not know what level of support to expect when signing up for the managed servers but decided to go for it anyway.</p>
<p>All&#160; can say is <strong>WOW!!!</strong>&#160; I am over the top impressed. </p>
<p> <span id="more-337"></span>
<p>We currently have 3 virtual servers hosted at ORCSWeb.&#160; One, we use as a development server, and the other two are in a webfarm configuration.&#160; I’ve always believed that when you go into production with a web site it’s critical you start with 2 servers in a webfarm.&#160; it’s really easy to go from 2 to 10, but can be very painful to go from 1 to 2.&#160;&#160; That’s a topic for another post, but suffice it to say, 2 is the minimum.</p>
<p>So, why am I so impressed?&#160; First, the support team they assigned to me is totally awesome.&#160; They all are focussed and competent which is a total relief compared with most hosting companies I’ve dealt with.&#160; Other companies always have good people, but it seems to be the bad ones that really give me cause to remember.&#160; Second, because I paid extra for the full managed support options on our three servers, I’ve been able to ask the things like the following.&#160; Almost all of them I could do myself, but I’m swamped with my technology role in the new company and really appreciate being able to hand stuff like this off.</p>
<ul>
<li>I’ve pointed my MX record at my .149 server.&#160; Could you please set up email and create the following 7 accounts. </li>
<li>Please Setup a secure ftp server at the following address with the following username and password (and make sure the user is locked down to the root) </li>
<li>Setup DFS Replication between these two directories on .148 and .149 </li>
<li>Create a RoboCopy script that copies files from my dev server to the .149 mirrored directory </li>
<li>Please set up web statistics for me on <a href="http://www.siliconvalley-codecamp.com">http://www.siliconvalley-codecamp.com</a> </li>
<li>Please figure out why SqlServer 2008 is not letting me access catalog MyStuff1 from user 3p1 and fix </li>
<li>Please make a replicate of website MyWeb1.com including the sqlserver catalog’s and put it on MyWeb2.com on server .149 </li>
<li>Please replace the sqlserver catalog MyStuff3 on server .149 with the bak file I uploaded to my ftp server </li>
<li>I could go on and on, but I think you are getting the idea. </li>
<li>Always with a smile, 24&#215;7, what else can I say. </li>
</ul>
<p>By the way, if you want to see one of my sites hosted there, go to <a href="http://www.siliconvalley-codecamp.com">http://www.siliconvalley-codecamp.com</a></p>
<p>Thank you <a href="http://www.orcsweb.com/">ORCSWeb</a> for making things a lot easier for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2009/07/27/orcsweb-hosting-company-awesome-review/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multi Level ASP.NET Menu with CSS Friendly Control Adapters (The Source Code!) Part 6</title>
		<link>http://peterkellner.net/2009/03/27/codecampwebsiteseries6-cssfriendly-adapters-aspnet-menu/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=codecampwebsiteseries6-cssfriendly-adapters-aspnet-menu</link>
		<comments>http://peterkellner.net/2009/03/27/codecampwebsiteseries6-cssfriendly-adapters-aspnet-menu/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 19:40:23 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[ASP.NET 3.5]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Code Camp Web Site Series]]></category>
		<category><![CDATA[CSS Adapters]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2009/03/27/codecampwebsiteseries6-cssfriendly-adapters-aspnet-menu/</guid>
		<description><![CDATA[Article Series



Article 1:
Best Practices for Building an ASP.NET quality web site


Article 2:
Multi Level ASP.NET Menu with CSS Friendly Control Adapters


Article 3:
Creating a Theme For Each Year of Code Camp Using Skins in ASP.NET


Article 4:
Creating a Modal Login Window Using the Telerik Modal RadWindow Component


Article 5:
Using LINQ to Merge Mailing Lists and Filter Opt Outs


Article 6:
Multi [...]]]></description>
			<content:encoded><![CDATA[<h2>Article Series</h2>
<table border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="100">Article 1:</td>
<td valign="top" width="600"><a href="http://peterkellner.net/2008/05/13/codecampwebsiteseries1/" target="_blank">Best Practices for Building an ASP.NET quality web site</a></td>
</tr>
<tr>
<td>Article 2:</td>
<td><a href="http://peterkellner.net/2008/05/19/codecampwebsiteseries2/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters</a></td>
</tr>
<tr>
<td>Article 3:</td>
<td><a href="http://peterkellner.net/2008/05/25/codecampwebsiteseries3/">Creating a Theme For Each Year of Code Camp Using Skins in ASP.NET</a></td>
</tr>
<tr>
<td>Article 4:</td>
<td><a href="http://peterkellner.net/2008/06/29/sv-code-camp-web-site-series4/">Creating a Modal Login Window Using the Telerik Modal RadWindow Component</a></td>
</tr>
<tr>
<td>Article 5:</td>
<td><a href="http://peterkellner.net/2008/07/03/combine-email-lists-with-linq/">Using LINQ to Merge Mailing Lists and Filter Opt Outs</a></td>
</tr>
<tr>
<td>Article 6:</td>
<td><a href="http://peterkellner.net/2009/03/27/codecampwebsiteseries6-cssfriendly-adapters-aspnet-menu/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters (The Source Code!)</a></td>
</tr>
</tbody>
</table>
<p> 
<p>I always intended to put the source code for this project online, however I just kept not getting around to it.&#160; In this article, I’m attaching a Visual Studio 2008 Solution that includes both the modified CSS Friendly Control Adapter as well as a sample application that demonstrates the technique in this series.&#160; I’m actually using the Code Camp CSS since that is the site that this solution was written for.&#160; I’ve created a much abbreviated version of the Code Camp Site Project for this demonstration.&#160; Below is the source code (finally).</p>
<p>Visual Studio 2008 Solution <a href="http://peterkellner.net/FilesForWebDownload/Mul.NETMenuwithCSSFriendlyControlAdapter_A90D/CSSFriendlyMenu.zip" target="_blank">CSSFriendlyCustomMenu</a></p>
<p>The solution is load out as follows:</p>
</p>
<p> <span id="more-275"></span>
</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/Mul.NETMenuwithCSSFriendlyControlAdapter_A90D/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/Mul.NETMenuwithCSSFriendlyControlAdapter_A90D/image_thumb.png" width="238" height="148" /></a></p>
<p>There are two projects (actually, one class library and a web site).&#160; The class library really is just the CSS Friendly Controls library with small modifications to the menu class.&#160; The WebSample web project is just a stripped down version of the code camp site to demonstrate the techniques used.&#160; When you run the web site, you should see results like the following.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/Mul.NETMenuwithCSSFriendlyControlAdapter_A90D/image_3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/Mul.NETMenuwithCSSFriendlyControlAdapter_A90D/image_thumb_3.png" width="671" height="240" /></a></p>
<p>&#160;</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/Mul.NETMenuwithCSSFriendlyControlAdapter_A90D/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/Mul.NETMenuwithCSSFriendlyControlAdapter_A90D/image_thumb_4.png" width="676" height="239" /></a></p>
<p>Notice that when the speakers page is shown, the Program menu stays highlighted. </p>
<p>And, the sitemap is as follows:</p>
<div style="border-bottom: gray 1px solid; border-left: gray 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; max-height: 200px; font-size: 8pt; overflow: auto; border-top: gray 1px solid; cursor: text; border-right: gray 1px solid; padding-top: 4px">
<div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">siteMap</span> <span style="color: #ff0000">xmlns</span><span style="color: #0000ff">=&quot;http://schemas.microsoft.com/AspNet/SiteMap-File-1.0&quot;</span> <span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   2:</span>   <span style="color: #0000ff">&lt;</span><span style="color: #800000">siteMapNode</span> <span style="color: #ff0000">url</span><span style="color: #0000ff">=&quot;Default.aspx&quot;</span> <span style="color: #ff0000">title</span><span style="color: #0000ff">=&quot;HOME&quot;</span>  <span style="color: #ff0000">description</span><span style="color: #0000ff">=&quot;Silicon Valley CodeCamp 08&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   3:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">siteMapNode</span> <span style="color: #ff0000">url</span><span style="color: #0000ff">=&quot;Register.aspx&quot;</span> <span style="color: #ff0000">title</span><span style="color: #0000ff">=&quot;REGISTER&quot;</span>  <span style="color: #ff0000">description</span><span style="color: #0000ff">=&quot;&quot;</span>  <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   4:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">siteMapNode</span> <span style="color: #ff0000">url</span><span style="color: #0000ff">=&quot;Program.aspx&quot;</span> <span style="color: #ff0000">title</span><span style="color: #0000ff">=&quot;PROGRAM&quot;</span>  <span style="color: #ff0000">description</span><span style="color: #0000ff">=&quot;&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   5:</span>       <span style="color: #0000ff">&lt;</span><span style="color: #800000">siteMapNode</span> <span style="color: #ff0000">url</span><span style="color: #0000ff">=&quot;SessionsOverview.aspx&quot;</span> <span style="color: #ff0000">title</span><span style="color: #0000ff">=&quot;Session Overview&quot;</span>  <span style="color: #ff0000">description</span><span style="color: #0000ff">=&quot;Session Overview&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   6:</span>       <span style="color: #0000ff">&lt;</span><span style="color: #800000">siteMapNode</span> <span style="color: #ff0000">url</span><span style="color: #0000ff">=&quot;Speakers.aspx&quot;</span> <span style="color: #ff0000">title</span><span style="color: #0000ff">=&quot;Speakers&quot;</span>  <span style="color: #ff0000">description</span><span style="color: #0000ff">=&quot;&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   7:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">siteMapNode</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   8:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">siteMapNode</span> <span style="color: #ff0000">url</span><span style="color: #0000ff">=&quot;News.aspx&quot;</span> <span style="color: #ff0000">title</span><span style="color: #0000ff">=&quot;NEWS&quot;</span>  <span style="color: #ff0000">description</span><span style="color: #0000ff">=&quot;&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">   9:</span>   <span style="color: #0000ff">&lt;/</span><span style="color: #800000">siteMapNode</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060">  10:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">siteMap</span><span style="color: #0000ff">&gt;</span></pre>
</p></div>
</div>
<p>That’s it!</p>
<p>Good luck with this.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2009/03/27/codecampwebsiteseries6-cssfriendly-adapters-aspnet-menu/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>One Week to Go Before Silicon Valley Code Camp! 118 Sessions, Over 1000 Registered (11/8,11/9)</title>
		<link>http://peterkellner.net/2008/11/01/siliconvalley-codecamp-final-prep-shirts/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=siliconvalley-codecamp-final-prep-shirts</link>
		<comments>http://peterkellner.net/2008/11/01/siliconvalley-codecamp-final-prep-shirts/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 18:18:05 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Code Camp Web Site Series]]></category>
		<category><![CDATA[Community]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2008/11/01/siliconvalley-codecamp-final-prep-shirts/</guid>
		<description><![CDATA[Things are really heating up here.&#160; We just did our walk through of Foothill College to insure we have room for everyone and all the food.&#160; (Coffee both mornings, lunches both days, Barbeque Saturday Night and bucket loads of technology sessions).&#160; As usual, I had my camera in tow so we could have some pictures.
 [...]]]></description>
			<content:encoded><![CDATA[<p>Things are really heating up here.&#160; We just did our walk through of Foothill College to insure we have room for everyone and all the food.&#160; (Coffee both mornings, lunches both days, Barbeque Saturday Night and bucket loads of technology sessions).&#160; As usual, I had my camera in tow so we could have some pictures.</p>
<p><a href="http://www.peterkellner.net/FilesForWebDownload/OneWeektoGoBeforeSiliconValleyCodeCamp11_9F14/IMG_1082.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="IMG_1082" src="http://www.peterkellner.net/FilesForWebDownload/OneWeektoGoBeforeSiliconValleyCodeCamp11_9F14/IMG_1082_thumb.jpg" width="244" height="184" /></a>     <br />Timothy Woods, <a href="http://www.foothill.fhda.edu/index.php">Foothill College</a> Dean checking on rainy day space for us</p>
<p> <span id="more-180"></span>
<p><a href="http://www.peterkellner.net/FilesForWebDownload/OneWeektoGoBeforeSiliconValleyCodeCamp11_9F14/IMG_1086.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="IMG_1086" src="http://www.peterkellner.net/FilesForWebDownload/OneWeektoGoBeforeSiliconValleyCodeCamp11_9F14/IMG_1086_thumb.jpg" width="244" height="184" /></a>     <br />Me, Mike Van Ripper and Timothy Woods sporting our Code Camp Speaker Shirts!</p>
<p><a href="http://www.peterkellner.net/FilesForWebDownload/OneWeektoGoBeforeSiliconValleyCodeCamp11_9F14/IMG_1086a.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="IMG_1086a" src="http://www.peterkellner.net/FilesForWebDownload/OneWeektoGoBeforeSiliconValleyCodeCamp11_9F14/IMG_1086a_thumb.jpg" width="244" height="207" /></a>     <br />If you can&#8217;t read the logo, it says Silicon Valley Code Camp V3.0</p>
<p>Check out our 118 Sessions!&#160; (including <a href="http://www.microsoft.com/azure/default.mspx">Microsoft Azure</a> sessions)&#160; <a title="http://www.siliconvalley-codecamp.com/Sessions.aspx?sortby=title&amp;by=category&amp;tag=264" href="http://www.siliconvalley-codecamp.com/Sessions.aspx?sortby=title&amp;by=category&amp;tag=264">http://www.siliconvalley-codecamp.com/Sessions.aspx?sortby=title&amp;by=category&amp;tag=264</a></p>
<p>All Sessions Here:</p>
<p><a title="http://www.siliconvalley-codecamp.com/SessionsOverview.aspx" href="http://www.siliconvalley-codecamp.com/SessionsOverview.aspx">http://www.siliconvalley-codecamp.com/SessionsOverview.aspx</a></p>
<p>See you next week at camp!</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2008/11/01/siliconvalley-codecamp-final-prep-shirts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using LINQ to Merge Mailing Lists and Filter Opt OutsBuilding the Code Camp Web Site (Article 5)</title>
		<link>http://peterkellner.net/2008/07/03/combine-email-lists-with-linq/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=combine-email-lists-with-linq</link>
		<comments>http://peterkellner.net/2008/07/03/combine-email-lists-with-linq/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 15:33:39 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[ASP.NET 3.5]]></category>
		<category><![CDATA[Code Camp Web Site Series]]></category>
		<category><![CDATA[How Things Work]]></category>
		<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://peterkellner.net/?p=321</guid>
		<description><![CDATA[<br />
<p>Combining two mailing lists with LINQ, then removing a third is demonstrated in this post.  Using C# 3.0 with .Net 3.5 allows us to leverage LINQ to make this an easy process.  This post shows and explains the LINQ code to do this</p>
<br />]]></description>
			<content:encoded><![CDATA[<h2>Article Series</h2>
<table border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="100">Article 1:</td>
<td valign="top" width="600"><a href="http://peterkellner.net/2008/05/13/codecampwebsiteseries1/" target="_blank">Best Practices for Building an ASP.NET quality web site</a></td>
</tr>
<tr>
<td>Article 2:</td>
<td><a href="http://peterkellner.net/2008/05/19/codecampwebsiteseries2/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters</a></td>
</tr>
<tr>
<td>Article 3:</td>
<td><a href="http://peterkellner.net/2008/05/25/codecampwebsiteseries3/">Creating a Theme For Each Year of Code Camp Using Skins in ASP.NET</a></td>
</tr>
<tr>
<td>Article 4:</td>
<td><a href="http://peterkellner.net/2008/06/29/sv-code-camp-web-site-series4/">Creating a Modal Login Window Using the Telerik Modal RadWindow Component</a></td>
</tr>
<tr>
<td>Article 5:</td>
<td><a href="http://peterkellner.net/2008/07/03/combine-email-lists-with-linq/">Using LINQ to Merge Mailing Lists and Filter Opt Outs</a></td>
</tr>
<tr>
<td>Article 6:</td>
<td><a href="http://peterkellner.net/2009/03/27/codecampwebsiteseries6-cssfriendly-adapters-aspnet-menu/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters (The Source Code!)</a></td>
</tr>
</tbody>
</table>
<p> <br />
<h2>The Problem</h2>
<p>For the third year in a row, <a href="http://www.siliconvalley-codecamp.com/">Silicon Valley&#8217;s Code Camp</a> is happening.&#160; The way I&#8217;ve organized the data is that each year I make a fresh new sql server 2005 database catalog.&#160; this means that I have one for 2006, one for 2007 and a new one for 2008.&#160; I want to do a mailing to all people who have registered to previous code camps and who have not registered yet for this code camp.&#160; This way, I can do multiple mailings without worrying about sending to people that who have registered (which would make me look silly for not knowing they registered already).&#160; I do not like when people say things like &quot;Ignore this message if you have registered&#8230;&quot;.&#160; In addition we will maintain an opt out list so that people who do not want additional emails sent can request that and not worry about us sending more emails.</p>
</p>
<p> <span id="more-122"></span>
</p>
<h2>The Givens</h2>
<p>So, since this article is about how to solve the problem with LINQ, I will not go into details of how to create the generic lists of email addresses.&#160; Let&#8217;s assume we have methods that give us these 4 lists. They are:</p>
<ul>
<li>2006 Registered Attendees </li>
<li>2007 Registered Attendees </li>
<li>2008 Registered Attendees </li>
<li>Opt Out Email List </li>
</ul>
<p>&#160;</p>
<h2>The Code</h2>
<p>Below is the C# version 3.0 (.Net 3.5 and asp.net 3.5) that performs this function described in the problem above.&#160; The next section &quot;The Explanation&quot; gives more details on what i s happening.</p>
<p>&#160;</p>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span><span class="kwrd">using</span> System.Linq;</pre>
<pre><span class="lnum">   2:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">   3:  </span><span class="rem">/// &lt;summary&gt;</span></pre>
<pre><span class="lnum">   4:  </span><span class="rem">/// shows all non registered users by going </span></pre>
<pre class="alt"><span class="lnum">   5:  </span><span class="rem">/// through past years and making a</span></pre>
<pre><span class="lnum">   6:  </span><span class="rem">/// unique query.</span></pre>
<pre class="alt"><span class="lnum">   7:  </span><span class="rem">/// &lt;/summary&gt;</span></pre>
<pre><span class="lnum">   8:  </span><span class="rem">/// &lt;returns&gt;List of all non-registered </span></pre>
<pre class="alt"><span class="lnum">   9:  </span><span class="rem">/// code campers form previous years&lt;/returns&gt;</span></pre>
<pre><span class="lnum">  10:  </span><span class="kwrd">public</span> <span class="kwrd">static</span> List&lt;ListItem&gt; LoadAllUnRegisteredCodeCampUsers()</pre>
<pre class="alt"><span class="lnum">  11:  </span>{</pre>
<pre><span class="lnum">  12:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">  13:  </span>    List&lt;<span class="kwrd">string</span>&gt; codeCampersCurrentYear = </pre>
<pre><span class="lnum">  14:  </span>        GetEmailsFromPreviousYear(<span class="str">&quot;CodeCampSV06&quot;</span>);</pre>
<pre class="alt"><span class="lnum">  15:  </span>&#160;</pre>
<pre><span class="lnum">  16:  </span>    List&lt;<span class="kwrd">string</span>&gt; emailOptOut2008 = </pre>
<pre class="alt"><span class="lnum">  17:  </span>        GetDoNotRemoveList(<span class="str">&quot;CodeCampSV06&quot;</span>);</pre>
<pre><span class="lnum">  18:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">  19:  </span>    List&lt;<span class="kwrd">string</span>&gt; codeCampers2007 = </pre>
<pre><span class="lnum">  20:  </span>        GetEmailsFromPreviousYear(<span class="str">&quot;PASTSV07&quot;</span>);</pre>
<pre class="alt"><span class="lnum">  21:  </span>&#160;</pre>
<pre><span class="lnum">  22:  </span>    List&lt;<span class="kwrd">string</span>&gt; codeCampers2006 = </pre>
<pre class="alt"><span class="lnum">  23:  </span>        GetEmailsFromPreviousYear(<span class="str">&quot;PASTSV06&quot;</span>);</pre>
<pre><span class="lnum">  24:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">  25:  </span>    <span class="rem">// Make Combined List of 06 and 07 and unique it </span></pre>
<pre><span class="lnum">  26:  </span>    <span class="rem">// (duplicates are removed in Union)</span></pre>
<pre class="alt"><span class="lnum">  27:  </span>    IEnumerable&lt;<span class="kwrd">string</span>&gt; uniqueNamesQuery =</pre>
<pre><span class="lnum">  28:  </span>        codeCampers2006.Union(codeCampers2007).OrderBy(s =&gt; s);</pre>
<pre class="alt"><span class="lnum">  29:  </span>&#160;</pre>
<pre><span class="lnum">  30:  </span>    var emailListBeforeOptOut = </pre>
<pre class="alt"><span class="lnum">  31:  </span>        uniqueNamesQuery.Except(codeCampersCurrentYear);</pre>
<pre><span class="lnum">  32:  </span>&#160;</pre>
<pre class="alt"><span class="lnum">  33:  </span>    var emaiListAfterOptOut = </pre>
<pre><span class="lnum">  34:  </span>        emailListBeforeOptOut.Except(emailOptOut2008);</pre>
<pre class="alt"><span class="lnum">  35:  </span>&#160;</pre>
<pre><span class="lnum">  36:  </span>    List&lt;ListItem&gt;  finalList = <span class="kwrd">new</span> List&lt;ListItem&gt;();</pre>
<pre class="alt"><span class="lnum">  37:  </span>    <span class="kwrd">foreach</span> (<span class="kwrd">string</span> s <span class="kwrd">in</span> emaiListAfterOptOut)</pre>
<pre><span class="lnum">  38:  </span>    {</pre>
<pre class="alt"><span class="lnum">  39:  </span>        finalList.Add(<span class="kwrd">new</span> ListItem(s,s));</pre>
<pre><span class="lnum">  40:  </span>    }</pre>
<pre class="alt"><span class="lnum">  41:  </span>    <span class="kwrd">return</span> finalList;</pre>
<pre><span class="lnum">  42:  </span>}</pre>
<pre class="alt"><span class="lnum">  43:  </span>&#160;</pre>
</div>
<style type="text/css">
<p>.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; }</style>
<p>&#160;</p>
<h2>The Explanation</h2>
<p>The first line (1) is required because all the LINQ methods we are using are static extension methods.&#160; This means, that without referencing the LINQ namespace, the methods OrderBy,Except and Union would not be available to us.</p>
<p>Lines 13 to 23 call methods that populate our generic lists of strings.&#160; The reason this is done is because each of these lists come from different <a href="http://www.microsoft.com/SQL/default.mspx">SQL Server 2005</a> database catalogs. This can probably be done in <a href="http://msdn.microsoft.com/en-us/netframework/aa904594.aspx">LINQ</a> but I thought it was easier to do it this way.</p>
<p>Line 27 creates a list of unique names.&#160; The Union method has the added benefit of eliminating duplicates.&#160; OrderBy(s=&gt;s) simply creates an annonymous delegate that takes in a string and returns a string so that is what gets sorted.&#160; After giving this some thought, I&#8217;m not sure the OrderBy really helps us in anyway but this is a tutorial type article so I&#8217;m leaving it in.</p>
<p>Line 33 removes all the people who have asked to be opted out of the email.&#160; It uses the static extension method Except.</p>
<p>Finally, line 36 to 40 creates a generic list of ListItems which is what is returned by the method.&#160; ListItem&#8217;s are returned primarily because the calling method shows a list of checkboxes and this makes it easy.</p>
<p>&#160;</p>
<p>&#160;</p>
<h2>Conclusions</h2>
<p>LINQ is a great tool for managing collections.&#160; In this case we demonstrated how to take 4 generic lists of strings (collections), do some simple set operations (union,except,orderby) and produce a list of emails we want to send.&#160; Not only is it simple to code, it&#8217;s easy to maintain because the method names are so descriptive.&#160;&#160; Hopefully, this will help with your similar programming efforts.&#160; Best of luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2008/07/03/combine-email-lists-with-linq/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Making the RSS Feed From the web site Discoverable</title>
		<link>http://peterkellner.net/2008/06/29/make-rss-discoverable-on-web-page/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=make-rss-discoverable-on-web-page</link>
		<comments>http://peterkellner.net/2008/06/29/make-rss-discoverable-on-web-page/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 16:09:58 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[ASP.NET 3.5]]></category>
		<category><![CDATA[Code Camp Web Site Series]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2008/06/29/make-rss-discoverable-on-web-page/</guid>
		<description><![CDATA[<br /><p>This post shows how to use a cool tool to making a RSS Feed Discoverable on a web page.  It involves creating an entry in the header tag of the page.</p>]]></description>
			<content:encoded><![CDATA[<p>After adding the RSS feed to our <a href="http://www.siliconvalley-codecamp.com/">Silicon Valley Code Camp Web site</a> I noticed that the feed was not discoverable by Internet Explorer.&#160; That is, the little RSS Icon on the toolbar was not finding it. </p>
<p><a href="http://peterkellner.net/wp/wp-content/uploads/2008/06/abcde.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="abcde" src="http://peterkellner.net/wp/wp-content/uploads/2008/06/abcde-thumb.png" width="476" height="456" /></a></p>
<p> <span id="more-119"></span>
<p>After a little searching around, I discovered that a header tag was needed.&#160; Further searching found a <a href="http://www.feedforall.com/autodiscovery.htm">nice web site that helped create this header tag for me</a>. </p>
<p>&#160;</p>
<p><a title="http://www.feedforall.com/autodiscovery.htm" href="http://www.feedforall.com/autodiscovery.htm">http://www.feedforall.com/autodiscovery.htm</a></p>
<p>&#160;</p>
<p><a href="http://peterkellner.net/wp/wp-content/uploads/2008/06/abcd.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="abcd" src="http://peterkellner.net/wp/wp-content/uploads/2008/06/abcd-thumb.png" width="501" height="458" /></a></p>
<p>Then, all I had to do was add that tag to my master page and the page is now discoverable!</p>
<p>&#160;</p>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span><span class="kwrd">&lt;</span><span class="html">html</span> <span class="attr">xmlns</span><span class="kwrd">=&quot;http://www.w3.org/1999/xhtml&quot;</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">   2:  </span><span class="kwrd">&lt;</span><span class="html">head</span> <span class="attr">id</span><span class="kwrd">=&quot;Head1&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">   3:  </span>    <span class="kwrd">&lt;</span><span class="html">title</span><span class="kwrd">&gt;</span>Silicon Valley Codecamp 2008<span class="kwrd">&lt;/</span><span class="html">title</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">   4:  </span>    <span class="kwrd">&lt;</span><span class="html">link</span> <span class="attr">rel</span><span class="kwrd">=&quot;alternate&quot;</span> <span class="attr">type</span><span class="kwrd">=&quot;application/rss+xml&quot;</span> </pre>
<pre class="alt"><span class="lnum">   5:  </span>       <span class="attr">title</span><span class="kwrd">=&quot;Code Camp Rss Feed&quot;</span> </pre>
<pre><span class="lnum">   6:  </span>       <span class="attr">href</span><span class="kwrd">=&quot;http://www.siliconvalley-codecamp.com/Rss.aspx&quot;</span> <span class="kwrd">/&gt;</span> </pre>
<pre class="alt"><span class="lnum">   7:  </span><span class="kwrd">&lt;/</span><span class="html">head</span><span class="kwrd">&gt;</span></pre>
</div>
<style type="text/css">
.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; }</style>
<p>Lines 4-6 are the header tag created by the autodiscovery tool listed above.</p>
<p>That&#8217;s it. Hope this helps. I did not include it in my <a href="http://peterkellner.net/category/code-camp-web-site-series/">series on building the code camp web site</a> because it seemed kind of a small point.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2008/06/29/make-rss-discoverable-on-web-page/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Creating a Modal Login Window Using the Telerik Modal RadWindow ComponentBuilding the Code Camp Web Site (Article 4)</title>
		<link>http://peterkellner.net/2008/06/29/sv-code-camp-web-site-series4/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sv-code-camp-web-site-series4</link>
		<comments>http://peterkellner.net/2008/06/29/sv-code-camp-web-site-series4/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 15:47:43 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[ASP.NET 3.5]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Code Camp Web Site Series]]></category>
		<category><![CDATA[How Things Work]]></category>

		<guid isPermaLink="false">http://peterkellner.net/?p=286</guid>
		<description><![CDATA[<br /><p>This article shows how to create a modal windows (not a popup) that displays a login windows (asking for username and password) in the middle of whatever asp.net page you are viewing.  It uses the Telerik Modal Radwindow control.  At the end of a successful login, the login dialog redirects the web user to some page designated by the author.  It requires no Javascript programming by the programmer.  Just simple method calls in the asp.net page.</p>]]></description>
			<content:encoded><![CDATA[<h3>Article Series</h3>
<table border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="100">Article 1:</td>
<td valign="top" width="600"><a href="http://peterkellner.net/2008/05/13/codecampwebsiteseries1/">Best Practices for Building an ASP.NET quality web site</a></td>
</tr>
<tr>
<td>Article 2:</td>
<td><a href="http://peterkellner.net/2008/05/19/codecampwebsiteseries2/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters</a></td>
</tr>
<tr>
<td>Article 3:</td>
<td><a href="http://peterkellner.net/2008/05/25/codecampwebsiteseries3/">Creating a Theme For Each Year of Code Camp Using Skins in ASP.NET</a></td>
</tr>
<tr>
<td>Article 4:</td>
<td><a href="http://peterkellner.net/2008/06/29/sv-code-camp-web-site-series4/">Creating a Modal Login Window Using the Telerik Modal RadWindow Component</a></td>
</tr>
<tr>
<td>Article 5:</td>
<td><a href="http://peterkellner.net/2008/07/03/combine-email-lists-with-linq/">Using LINQ to Merge Mailing Lists and Filter Opt Outs</a></td>
</tr>
<tr>
<td>Article 6:</td>
<td><a href="http://peterkellner.net/2009/03/27/codecampwebsiteseries6-cssfriendly-adapters-aspnet-menu/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters (The Source Code!)</a></td>
</tr>
</tbody>
</table>
<p> <br />
<h2>Introduction</h2>
<p>This article shows how to create a modal windows (not a popup) that displays a login windows (asking for username and password) in the middle of whatever <a href="http://www.asp.net/">asp.net</a> page you are viewing.&#160; It uses the <a href="http://www.telerik.com/products/aspnet-ajax/controls/window/overview.aspx">Telerik Modal Radwindow</a> control.&#160; At the end of a successful login, the login dialog redirects the web user to some page designated by the author.&#160; It requires no <a href="http://www.javascript.com/">Javascript</a> programming by the programmer.&#160; Just simple method calls in the <a href="http://www.asp.net/">asp.net</a> page.</p>
<p> <span id="more-118"></span> </p>
<h2>How it Looks to the Web User</h2>
<p>When the user press the login button in the upper right corner of the <a href="http://www.siliconvalley-codecamp.com/">Silicon Valley Code Camp web site</a>, below is the screen they see.</p>
<p><a href="http://peterkellner.net/wp/wp-content/uploads/2008/06/test.png">     <br /> <img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="test" src="http://peterkellner.net/wp/wp-content/uploads/2008/06/test-thumb.png" width="384" height="332" /></a></p>
<p>Notice that the screen behind actually fades out and is not able to be clicked by the web user.</p>
<h2>The Method Behind Creating the Modal Window</h2>
<p>OK, so there is a little bit of javascript you need to add to your page.&#160; Basically, what you do is in your master page, around where you have your login control, you put the following code into your aspx page.</p>
<div class="csharpcode">
<pre><span class="kwrd"></span></pre>
</div>
<div class="csharpcode">
<pre class="alt"><span class="lnum">   1:  </span> <span class="kwrd">&lt;</span><span class="html">asp:ScriptManager</span> <span class="attr">ID</span><span class="kwrd">=&quot;ScriptManager1&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="attr">EnablePartialRendering</span><span class="kwrd">=&quot;true&quot;</span> <span class="kwrd">/&gt;</span></pre>
<pre><span class="lnum">   2:  </span>    <span class="kwrd">&lt;</span><span class="html">table</span> <span class="attr">class</span><span class="kwrd">=&quot;headBar&quot;</span> <span class="attr">cellpadding</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">cellspacing</span><span class="kwrd">=&quot;0&quot;</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">   3:  </span>        <span class="kwrd">&lt;</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">   4:  </span>            <span class="kwrd">&lt;</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">   5:  </span>                <span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">class</span><span class="kwrd">=&quot;headLogo&quot;</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">   6:  </span>                <span class="kwrd">&lt;</span><span class="html">asp:HyperLink</span> <span class="attr">ID</span><span class="kwrd">=&quot;HomeLink&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="attr">NavigateUrl</span><span class="kwrd">=&quot;Default.aspx&quot;</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">   7:  </span>                    <span class="kwrd">&lt;</span><span class="html">asp:Image</span> <span class="attr">ID</span><span class="kwrd">=&quot;HeadLogo&quot;</span> <span class="attr">SkinID</span><span class="kwrd">=&quot;ImageLogo&quot;</span> <span class="attr">AlternateText</span><span class="kwrd">=&quot;Silicon Valley codecamp_08&quot;</span></pre>
<pre><span class="lnum">   8:  </span>                        <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="kwrd">/&gt;</span></pre>
<pre class="alt"><span class="lnum">   9:  </span>                <span class="kwrd">&lt;/</span><span class="html">asp:HyperLink</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">  10:  </span>                </pre>
<pre class="alt"><span class="lnum">  11:  </span>               </pre>
<pre><span class="lnum">  12:  </span>                </pre>
<pre class="alt"><span class="lnum">  13:  </span>                <span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">  14:  </span>            <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  15:  </span>            <span class="kwrd">&lt;</span><span class="html">td</span> <span class="attr">valign</span><span class="kwrd">=&quot;middle&quot;</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">  16:  </span>                <span class="kwrd">&lt;</span><span class="html">span</span> <span class="attr">class</span><span class="kwrd">=&quot;headDate&quot;</span><span class="kwrd">&gt;</span>Saturday and Sunday, November 8th &amp; 9th, 2008<span class="kwrd">&lt;/</span><span class="html">span</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  17:  </span>            <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">  18:  </span>            <span class="kwrd">&lt;</span><span class="html">td</span> <span class="attr">align</span><span class="kwrd">=&quot;right&quot;</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  19:  </span>                <span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">class</span><span class="kwrd">=&quot;headLogin&quot;</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">  20:  </span>                    <span class="kwrd">&lt;</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  21:  </span> </pre>
<pre><span class="lnum">  22:  </span>                        <span class="kwrd">&lt;</span><span class="html">script</span> <span class="attr">type</span><span class="kwrd">=&quot;text/javascript&quot;</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  23:  </span>                            <span class="rem">//&lt;![CDATA[</span></pre>
<pre><span class="lnum">  24:  </span>                            <span class="rem">//show the window</span></pre>
<pre class="alt"><span class="lnum">  25:  </span>                            <span class="kwrd">function</span> showDialog()</pre>
<pre><span class="lnum">  26:  </span>                            {                    </pre>
<pre class="alt"><span class="lnum">  27:  </span>                                <span class="rem">//Force reload in order to guarantee that the onload event handler </span></pre>
<pre><span class="lnum">  28:  </span>                                <span class="rem">// of the dialog which configures it executes on every show.</span></pre>
<pre class="alt"><span class="lnum">  29:  </span>                                <span class="kwrd">var</span> oWnd = window.radopen(<span class="kwrd">null</span>, <span class="str">&quot;DialogWindow&quot;</span>);</pre>
<pre><span class="lnum">  30:  </span>                                oWnd.setUrl(oWnd.get_navigateUrl());</pre>
<pre class="alt"><span class="lnum">  31:  </span>                            }</pre>
<pre><span class="lnum">  32:  </span>                            </pre>
<pre class="alt"><span class="lnum">  33:  </span>                           </pre>
<pre><span class="lnum">  34:  </span>                            <span class="rem">// Called when a window is being closed.  (force refresh)</span></pre>
<pre class="alt"><span class="lnum">  35:  </span>                            <span class="kwrd">function</span> OnClientclose(radWindow)</pre>
<pre><span class="lnum">  36:  </span>                            {     </pre>
<pre class="alt"><span class="lnum">  37:  </span>                                 window.location.href = <span class="str">&quot;News.aspx&quot;</span>;           </pre>
<pre><span class="lnum">  38:  </span>                            }    </pre>
<pre class="alt"><span class="lnum">  39:  </span>                            <span class="rem">//]]&gt;            </span></pre>
<pre><span class="lnum">  40:  </span>                        <span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  41:  </span> </pre>
<pre><span class="lnum">  42:  </span>                        <span class="kwrd">&lt;</span><span class="html">asp:ImageButton</span> <span class="attr">ID</span><span class="kwrd">=&quot;IDLoginButton&quot;</span> <span class="attr">SkinID</span><span class="kwrd">=&quot;ButtonLogin&quot;</span> </pre>
<pre class="alt"><span class="lnum">  43:  </span>                            <span class="attr">OnClientClick</span><span class="kwrd">=&quot;showDialog();return false;&quot;</span></pre>
<pre><span class="lnum">  44:  </span>                            <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="kwrd">/&gt;</span>   </pre>
<pre class="alt"><span class="lnum">  45:  </span>                        <span class="kwrd">&lt;</span><span class="html">asp:LoginStatus</span> <span class="attr">ID</span><span class="kwrd">=&quot;IDLoginStatus1&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="kwrd">/&gt;</span></pre>
<pre><span class="lnum">  46:  </span>                        <span class="kwrd">&lt;</span><span class="html">asp:LoginName</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="attr">ID</span><span class="kwrd">=&quot;IDLoginName1&quot;</span> <span class="kwrd">/&gt;</span></pre>
<pre class="alt"><span class="lnum">  47:  </span>                        <span class="kwrd">&lt;</span><span class="html">telerik:RadWindowManager</span> <span class="attr">ID</span><span class="kwrd">=&quot;Singleton&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">  48:  </span>                            <span class="kwrd">&lt;</span><span class="html">Windows</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  49:  </span>                                <span class="kwrd">&lt;</span><span class="html">telerik:RadWindow</span> <span class="attr">ID</span><span class="kwrd">=&quot;DialogWindow&quot;</span> <span class="attr">Behaviors</span><span class="kwrd">=&quot;Close&quot;</span> </pre>
<pre><span class="lnum">  50:  </span>                                    <span class="attr">ReloadOnShow</span><span class="kwrd">=&quot;true&quot;</span> <span class="attr">OnClientClose</span><span class="kwrd">=&quot;OnClientclose&quot;</span></pre>
<pre class="alt"><span class="lnum">  51:  </span>                                    <span class="attr">BackColor</span><span class="kwrd">=&quot;Gray&quot;</span> <span class="attr">Modal</span><span class="kwrd">=&quot;true&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="attr">Height</span><span class="kwrd">=&quot;250&quot;</span> </pre>
<pre><span class="lnum">  52:  </span>                                    <span class="attr">NavigateUrl</span><span class="kwrd">=&quot;./Login.aspx&quot;</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  53:  </span>                                <span class="kwrd">&lt;/</span><span class="html">telerik:RadWindow</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">  54:  </span>                            <span class="kwrd">&lt;/</span><span class="html">Windows</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  55:  </span>                        <span class="kwrd">&lt;/</span><span class="html">telerik:RadWindowManager</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">  56:  </span>                        </pre>
<pre class="alt"><span class="lnum">  57:  </span>                        <span class="kwrd">&lt;</span><span class="html">asp:HyperLink</span> <span class="attr">ID</span><span class="kwrd">=&quot;HyperLinkForgotChangePassword&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> </pre>
<pre><span class="lnum">  58:  </span>                             <span class="attr">NavigateUrl</span><span class="kwrd">=&quot;~/PasswordIssues.aspx&quot;</span> <span class="attr">Text</span><span class="kwrd">=&quot;Forgot Password?&quot;</span> <span class="kwrd">&gt;&lt;/</span><span class="html">asp:HyperLink</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  59:  </span>                        </pre>
<pre><span class="lnum">  60:  </span>                    <span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  61:  </span>                    </pre>
<pre><span class="lnum">  62:  </span>                <span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="lnum">  63:  </span>            <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<pre><span class="lnum">  64:  </span>        <span class="kwrd">&lt;/</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
</div>
<p>Line 22 to 40 shows the javascript.&#160; Basically, you are calling the Telerik window.radopen method which is associated with the tag on line 49.&#160; It automatically navigates to the login.aspx page which is referenced in line 52.&#160; When the page closes, the javascript on line 37 tells the browser to redirect to the News.aspx page.&#160; The reason I do this is because if you don&#8217;t change pages, I&#8217;ve found the the login cookie is not set (Authorization cookie).&#160; When this happens, even though the person is logged in, they do not see that they are until a page refresh happens.&#160; Very confusing to the user.</p>
<h2>Conclusions</h2>
<p>That is really all this is to adding a windows that displays in the middle of your page.&#160; It&#8217;s so much nicer than having to send the user to a separate page to login.&#160; They can see where they are as they are logging in.&#160; I hope this helps you.&#160; I find it a very useful technique I can use in lots of web sites.</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2008/06/29/sv-code-camp-web-site-series4/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Creating a Theme For Each Year of Code Camp Using Skins in ASP.NETBuilding the New Code Camp Web Site (Part 3)</title>
		<link>http://peterkellner.net/2008/05/25/codecampwebsiteseries3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=codecampwebsiteseries3</link>
		<comments>http://peterkellner.net/2008/05/25/codecampwebsiteseries3/#comments</comments>
		<pubDate>Sun, 25 May 2008 22:17:56 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[ASP.NET 3.5]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Code Camp Web Site Series]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2008/05/25/codecampwebsiteseries3/</guid>
		<description><![CDATA[<p>In this post, we discuss how to use themes and skins together in an ASP.NET web site.  A complete example is shown including the web.config, a master page and the theme.skin file.  This is an ongoing series of the trials and tribulations of building a new code camp web site.</p>]]></description>
			<content:encoded><![CDATA[<h2>Article Series</h2>
<table border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="100">Article 1:</td>
<td valign="top" width="600"><a href="http://peterkellner.net/2008/05/13/codecampwebsiteseries1/" target="_blank">Best Practices for Building an ASP.NET quality web site</a></td>
</tr>
<tr>
<td>Article 2:</td>
<td><a href="http://peterkellner.net/2008/05/19/codecampwebsiteseries2/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters</a></td>
</tr>
<tr>
<td>Article 3:</td>
<td><a href="http://peterkellner.net/2008/05/25/codecampwebsiteseries3/">Creating a Theme For Each Year of Code Camp Using Skins in ASP.NET</a></td>
</tr>
<tr>
<td>Article 4:</td>
<td><a href="http://peterkellner.net/2008/06/29/sv-code-camp-web-site-series4/">Creating a Modal Login Window Using the Telerik Modal RadWindow Component</a></td>
</tr>
<tr>
<td>Article 5:</td>
<td><a href="http://peterkellner.net/2008/07/03/combine-email-lists-with-linq/">Using LINQ to Merge Mailing Lists and Filter Opt Outs</a></td>
</tr>
<tr>
<td>Article 6:</td>
<td><a href="http://peterkellner.net/2009/03/27/codecampwebsiteseries6-cssfriendly-adapters-aspnet-menu/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters (The Source Code!)</a></td>
</tr>
</tbody>
</table>
<p> <br />
<h2>Introduction</h2>
<p>Creating themes for ASP.NET 2.0 is very easy if you follow the standard guidelines Microsoft gives us.&#160; Microsoft gives a pretty good discussion in the MSDN article    <br /> <a href="http://msdn.microsoft.com/en-us/library/ykzx33wh.aspx">ASP.NET Themes and Skins Overview</a>.&#160; I&#8217;ve read it several times but since I don&#8217;t do this very often I keep forgetting the simple things.&#160; Recently,     <br /> <a href="http://forums.asp.net/t/1265904.aspx">I posted a question on ASP.NET forums</a> asking how to have an image automatically come from the correct theme directory.&#160; As usual, <a href="http://blogs.ipona.com/davids/Default.aspx">Dave Sussman</a>     <br /> gave me the perfect answer.</p>
<p><em>&quot;You should store the images under the themes and set the ImageUrl in the skin file. Give the control a SkinID in both the skin file and in the page. When the theme changes the appropriate image will be used.&quot;</em></p>
<p>In this article, I&#8217;ll basically explain his answer with an example using the code camp web site.</p>
<p> <span id="more-114"></span> </p>
<h2>Code Camp Site Structure</h2>
<p>The Code Camp project has a very standard directory setup.&#160; In Visual Studio 2008, the solution explorer looks like this:    <br /> <a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/solu.png">     <br /> <img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="solu" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/solu-thumb.png" width="372" height="301" /></a></p>
<p>Notice that I have two themes defined, Gray2008 and Gray2009.&#160; The reason for this is so when 2009 comes along and we want to change certain images that contain things like the Code Camp Date and Year, we don&#8217;t have to do surgery on the asp.net pages, but simply change to the new theme and update the files there.&#160; This also keeps the code base intact so we don&#8217;t have to branch our code for next year.&#160; All in all, a very clean solution.</p>
<h2>The Mechanics of Theme Changing and the Skin Definitions</h2>
<p>First, you have simple mention in your web.config file the name of the default theme you will be using.&#160; By doing that, it references the correct App_Themes sub directory. Our web.config looks like the following for this year which means we will be using the Gray2009 theme directory.</p>
<p><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/webconfigtheme.png">     <br /> <img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="webconfigtheme" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/webconfigtheme-thumb.png" width="479" height="73" /></a></p>
<p>Second, you need to mention a SkinId in any control you may use.&#160; In our case, we want to have the image on the upper right side of the code camp web site display the correct year.&#160; That is, on the home page we have something like this:</p>
<p><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/actualpngforcc.png">     <br /> <img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="actualpngforcc" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/actualpngforcc-thumb.png" width="498" height="134" /></a></p>
<p>The tag in the master page looks like this:</p>
<p><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/imagetag.png">     <br /> <img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="imagetag" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/imagetag-thumb.png" width="577" height="100" /></a></p>
<p>Notice the SkinId circled in green.&#160; Also notice that there is no ImageUrl defined in this tag.&#160; What happens next is that web site will look in the default theme&#8217;s SkinFile.skin file (see the solution explorer above for this).&#160; In the App_Themes/Gray2008/SkinFile.skin file there is a reference that finds the actual image file that will be used.&#160; It reference it from the App_THemes/Gray2008/Images directory as follows:</p>
<p><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/skinfile.png">     <br /> <img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="skinfile" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/skinfile-thumb.png" width="586" height="108" /></a></p>
<p>And, that&#8217;s it!&#160; Just by changing the theme in the web.config file, the correct image file will be displayed in the master page.&#160; The other nice thing is that design time support works also.&#160; You will see in the Visual Studio 2008 Designer the correct image based on where your web.config points.</p>
<h2>Conclusion</h2>
<p>In this article, we&#8217;ve shown the details of how to have a flexible design that    <br /> supports multiple theme files.&#160; Something we will use for years and years with     <br /> the new Code Camp web site.&#160; We also may decide to have different themes for     <br /> different types of users.&#160; That is, admin&#8217;s may have a different theme than     <br /> normal users.&#160; We could also let users pick there own color styles by having     <br /> different themes.&#160; Lots of possibilities.</p>
<p>I hope this helps you.</p>
<p>&#160;</p>
<style type="text/css">
<p>.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;
}</style>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2008/05/25/codecampwebsiteseries3/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Multi Level ASP.NET Menu with CSS Friendly Control AdaptersBuilding the New Code Camp Web Site (Part 2)</title>
		<link>http://peterkellner.net/2008/05/19/codecampwebsiteseries2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=codecampwebsiteseries2</link>
		<comments>http://peterkellner.net/2008/05/19/codecampwebsiteseries2/#comments</comments>
		<pubDate>Mon, 19 May 2008 22:38:46 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Code Camp Web Site Series]]></category>
		<category><![CDATA[CSS Adapters]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2008/05/19/codecampwebsiteseries2/</guid>
		<description><![CDATA[<p>This article discusses the CSS Friendly Adapters and how they are integraged with the ASP.NET 2.0 menu control.  It shows the default html created by a sample menu control without the Friendly Adapters, as well as showing the html created using the Friendly Adapters.</p>]]></description>
			<content:encoded><![CDATA[<h2>Article Series</h2>
<blockquote>
<p><strong><em>(Source Code Available in Article 6 Below &#8211; (Added March 2009))</em></strong></p>
</blockquote>
<table border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="100">Article 1:</td>
<td valign="top" width="600"><a href="http://peterkellner.net/2008/05/13/codecampwebsiteseries1/" target="_blank">Best Practices for Building an ASP.NET quality web site</a></td>
</tr>
<tr>
<td>Article 2:</td>
<td><a href="http://peterkellner.net/2008/05/19/codecampwebsiteseries2/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters</a></td>
</tr>
<tr>
<td>Article 3:</td>
<td><a href="http://peterkellner.net/2008/05/25/codecampwebsiteseries3/">Creating a Theme For Each Year of Code Camp Using Skins in ASP.NET</a></td>
</tr>
<tr>
<td>Article 4:</td>
<td><a href="http://peterkellner.net/2008/06/29/sv-code-camp-web-site-series4/">Creating a Modal Login Window Using the Telerik Modal RadWindow Component</a></td>
</tr>
<tr>
<td>Article 5:</td>
<td><a href="http://peterkellner.net/2008/07/03/combine-email-lists-with-linq/">Using LINQ to Merge Mailing Lists and Filter Opt Outs</a></td>
</tr>
<tr>
<td>Article 6:</td>
<td><a href="http://peterkellner.net/2009/03/27/codecampwebsiteseries6-cssfriendly-adapters-aspnet-menu/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters (The Source Code!)</a></td>
</tr>
</tbody>
</table>
<p></p>
<h2>Introduction</h2>
<div>
<div class="peterkellnerpromo">If you have complex styling issues involving ASP.NET we are experts and might be able to help.  This technique is fairly old however newer methods could be used for similar results. Contact Peter Kellner and his associates <a href="http://peterkellner.net/contactus">here</a>. </div>
<div>
<p>It&#8217;s often the case that brilliant designers will make interfaces that are hard to implement using standard frameworks like ASP.NET.&#160; As Software engineers striving for consistency, we always want to do the best we can with the standard tool kits to take advantage for built in functionality.&#160; <a href="http://asp.net/" target="_blank">ASP.NET 2.0&#8242;s</a> built in menu system is a perfect example.&#160; If you use that menu system, you get to make very simple declarative site maps by simply using the <a href="http://weblogs.asp.net/scottgu/archive/2005/11/20/431019.aspx">ASP.NET 2.0 Site Navigation Features.</a></p>
<p>The requirement faced today has to do with building the web site for our <a href="http://www.siliconvalley-codecamp.com/" target="_blank">third annual code camp</a>.&#160; We have that brilliant designer I mentioned above, and he has made a design that just seems too perfect to compromise.&#160; Here are some screen shots of how the designer envisions the sight looking and working after it is completed.</p>
</p></div>
<p><span id="more-112"></span></p>
<table border="0" cellspacing="0" cellpadding="2" width="800">
<tbody>
<tr>
<td valign="top" width="800">
          <br /><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/css1.jpg"><br />
            <br /><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="css1" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/css1-thumb.jpg" width="740" height="133" /></a> </p>
<p></td>
</tr>
<tr>
<td valign="top" width="800">
          <br /><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/css2.jpg"><br />
            <br /><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="css2" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/css2-thumb.jpg" width="741" height="121" /></a> </p>
<p></td>
</tr>
<tr>
<td valign="top" width="800">
          <br /><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/css3.jpg"><br />
            <br /><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="css3" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/css3-thumb.jpg" width="740" height="136" /></a> </p>
<p></td>
</tr>
<tr>
<td valign="top" width="800">
          <br /><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/css4.jpg"><br />
            <br /><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="css4" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/css4-thumb.jpg" width="741" height="124" /></a> </p>
<p></td>
</tr>
<tr>
<td valign="top" width="800">
          <br /><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/css5.jpg"><br />
            <br /><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="css5" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/css5-thumb.jpg" width="748" height="134" /></a> </p>
<p></td>
</tr>
</tbody>
</table>
<p>Notice the interesting behavior of the top menu (REGISTER;PROGRAM;NEWS;ABOUT AND WIKI).&#160; Unselected, the bottom line strip is the same as selected.&#160; When selected, the background of the selection changes to a different shade of the same color as the bottom strip.</p>
<p>Also notice the interesting behavior of the secondary menu. that is, when ABOUT is selected from the top menu, notice that the secondary menu shows: Contact;Venue;Organizers;Sponsors and Previous.&#160; As you can see above (on the bottom of the 5 pictures), when Venu is selected, it is highlighted to in bright white to indicate that you have selected that.&#160; The really cool part here is that the ABOUT on the primary menu stays highlighted when you choose different&#160; secondary menu choices.</p>
<h2>Why Go Through The Trouble, why not just do it with HTML and CSS directly</h2>
<p>So, a reasonable person might say that since you can&#8217;t easily get this behavior with the asp:menu control and the site map provider (OK, at least I couldn&#8217;t figure it out), why not just code this up with simple list items, button clicks and a pile of code to react to those things?&#160; Well, the answer is you can certainly do that.&#160; The problem is the next time you want to do something similar you will find yourself doing a lot of cut and pasting.&#160; Personally, whenever I find myself cutting and pasting a lot I know I should probably think about how to refactor the code to make it more reusable and therefore more reliable.</p>
<h2>What Are the Benefits of Using asp:menu and the site map providers </h2>
<p>I mentioned that there are benefits to using the asp:menu and site map providers.&#160; What are those benefits you might ask.&#160; Well, let me first show you what you have to do to set up a simple menu system using these, then list the benefits of what comes out.</p>
<h3>The Web.SiteMap</h3>
<p>First, you need to create a web.sitemap file in your web directory.&#160; Here is what a simple one looks like similar to what will create the pictures above.</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;?</span><span class="html">xml</span> <span class="attr">version</span><span class="kwrd">=&quot;1.0&quot;</span> <span class="attr">encoding</span><span class="kwrd">=&quot;utf-8&quot;</span> ?<span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>   <span class="kwrd">&lt;</span><span class="html">siteMap</span> <span class="attr">xmlns</span><span class="kwrd">=&quot;http://schemas.microsoft.com/AspNet/SiteMap-File-1.0&quot;</span> <span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">      <span class="kwrd">&lt;</span><span class="html">siteMapNode</span> <span class="attr">url</span><span class="kwrd">=&quot;Default.aspx&quot;</span> <span class="attr">title</span><span class="kwrd">=&quot;HOME&quot;</span> <span class="attr">description</span><span class="kwrd">=&quot;Silicon Valley CodeCamp 08&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>            <span class="kwrd">&lt;</span><span class="html">siteMapNode</span> <span class="attr">url</span><span class="kwrd">=&quot;Register.aspx&quot;</span> <span class="attr">title</span><span class="kwrd">=&quot;REGISTER&quot;</span>  <span class="attr">description</span><span class="kwrd">=&quot;&quot;</span> <span class="kwrd">/&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">            <span class="kwrd">&lt;</span><span class="html">siteMapNode</span> <span class="attr">url</span><span class="kwrd">=&quot;News.aspx&quot;</span> <span class="attr">title</span><span class="kwrd">=&quot;NEWS&quot;</span>  <span class="attr">description</span><span class="kwrd">=&quot;&quot;</span> <span class="kwrd">/&gt;</span></pre>
<p>&#160;</p>
<pre>            <span class="kwrd">&lt;</span><span class="html">siteMapNode</span> <span class="attr">url</span><span class="kwrd">=&quot;About.aspx&quot;</span> <span class="attr">title</span><span class="kwrd">=&quot;ABOUT&quot;</span>  <span class="attr">description</span><span class="kwrd">=&quot;&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">            <span class="kwrd">&lt;</span><span class="html">siteMapNode</span> <span class="attr">url</span><span class="kwrd">=&quot;Contact.aspx&quot;</span> <span class="attr">title</span><span class="kwrd">=&quot;Contact&quot;</span>  <span class="attr">description</span><span class="kwrd">=&quot;&quot;</span> <span class="kwrd">/&gt;</span></pre>
<p>&#160;</p>
<pre>            <span class="kwrd">&lt;</span><span class="html">siteMapNode</span> <span class="attr">url</span><span class="kwrd">=&quot;Sponsors.aspx&quot;</span> <span class="attr">title</span><span class="kwrd">=&quot;Sponsors&quot;</span>  <span class="attr">description</span><span class="kwrd">=&quot;&quot;</span> <span class="kwrd">/&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">            <span class="kwrd">&lt;</span><span class="html">siteMapNode</span> <span class="attr">url</span><span class="kwrd">=&quot;Previous.aspx&quot;</span> <span class="attr">title</span><span class="kwrd">=&quot;Previous&quot;</span>  <span class="attr">description</span><span class="kwrd">=&quot;&quot;</span> <span class="kwrd">/&gt;</span></pre>
<p>&#160;</p>
<pre>         <span class="kwrd">&lt;/</span><span class="html">siteMapNode</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">      <span class="kwrd">&lt;/</span><span class="html">siteMapNode</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>   <span class="kwrd">&lt;/</span><span class="html">siteMap</span><span class="kwrd">&gt;</span></pre>
</p></div>
<h3>The Web.Config </h3>
<p>You need to declare which sitemap provider you are using. In our case, we are simply reading from a file.&#160; Then, you should (do not have to) declare a section for each web page you want to provide role access to.&#160; Here is an example of my web.config. This first part says give access to any logged in user for Sponsors.aspx</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">location</span> <span class="attr">path</span><span class="kwrd">=&quot;Sponsors.aspx&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>    <span class="kwrd">&lt;</span><span class="html">system.web</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">        <span class="kwrd">&lt;</span><span class="html">authorization</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>            <span class="kwrd">&lt;</span><span class="html">deny</span> <span class="attr">users</span><span class="kwrd">=&quot;?&quot;</span><span class="kwrd">/&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">        <span class="kwrd">&lt;/</span><span class="html">authorization</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>    <span class="kwrd">&lt;/</span><span class="html">system.web</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">location</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre><span class="kwrd">&lt;/</span><span class="html">configuration</span><span class="kwrd">&gt;</span></pre>
</p></div>
<p>The Second part defines the Site Map Provider and sets securityTrimming to true to only show pages the user has access to.</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">system.web</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>    <span class="kwrd">&lt;</span><span class="html">siteMap</span> <span class="attr">defaultProvider</span><span class="kwrd">=&quot;XmlSiteMapProvider&quot;</span> <span class="attr">enabled</span><span class="kwrd">=&quot;true&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">    <span class="kwrd">&lt;</span><span class="html">providers</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>        <span class="kwrd">&lt;</span><span class="html">add</span> <span class="attr">name</span><span class="kwrd">=&quot;XmlSiteMapProvider&quot;</span> </pre>
<p>&#160;</p>
<pre class="alt">        <span class="attr">description</span><span class="kwrd">=&quot;SiteMap provider which reads in .sitemap XML files.&quot;</span> </pre>
<p>&#160;</p>
<pre>        <span class="attr">type</span><span class="kwrd">=&quot;System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0,... </pre>
<p>&#160;</p>
<pre class="alt">        siteMapFile=&quot;</span><span class="attr">web</span>.<span class="attr">sitemap</span><span class="kwrd">&quot; securityTrimmingEnabled=&quot;</span><span class="attr">true</span>&quot;<span class="kwrd">/&gt;</span></pre>
<p>&#160;</p>
<pre>    <span class="kwrd">&lt;/</span><span class="html">providers</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">    <span class="kwrd">&lt;/</span><span class="html">siteMap</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>&#160;</pre>
</p></div>
<h3>The Master Page</h3>
<p>In your master page, you need to define your primary menu.&#160; In our case, it is the one that displays: REGISTER;NEWS and ABOUT.&#160; Here is all you need for that.</p>
<div class="csharpcode">
<pre class="alt">    <span class="kwrd">&lt;</span><span class="html">asp:Menu</span> <span class="attr">ID</span><span class="kwrd">=&quot;mainMenu&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="attr">Orientation</span><span class="kwrd">=&quot;Horizontal&quot;</span> </pre>
<p>&#160;</p>
<pre>        <span class="attr">DataSourceID</span><span class="kwrd">=&quot;SiteMapMain&quot;</span> <span class="attr">CssClass</span><span class="kwrd">=&quot;headLinksBar&quot;</span>  <span class="attr">CssSelectorClass</span><span class="kwrd">=&quot;SimpleEntertainmentMenu&quot;</span></pre>
<p>&#160;</p>
<pre class="alt">        <span class="attr">MaximumDynamicDisplayLevels</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">StaticItemFormatString</span><span class="kwrd">=&quot;// {0} &amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>    <span class="kwrd">&lt;/</span><span class="html">asp:Menu</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">asp:SiteMapDataSource</span> <span class="attr">ID</span><span class="kwrd">=&quot;SiteMapMain&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="attr">ShowStartingNode</span><span class="kwrd">=&quot;False&quot;</span> <span class="kwrd">/&gt;</span></pre>
</p></div>
<h3>The Inherited Page (About.aspx For Example)</h3>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">asp:Content</span> <span class="attr">ID</span><span class="kwrd">=&quot;SublinksSessions&quot;</span> <span class="attr">ContentPlaceHolderID</span><span class="kwrd">=&quot;Sublinks&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>    <span class="kwrd">&lt;</span><span class="html">asp:Menu</span> <span class="attr">ID</span><span class="kwrd">=&quot;subMenu&quot;</span> <span class="attr">runat</span><span class="kwrd">=&quot;server&quot;</span> <span class="attr">DataSourceID</span><span class="kwrd">=&quot;SiteMapAbout&quot;</span> <span class="attr">SkinID</span><span class="kwrd">=&quot;subMenu&quot;</span>  <span class="attr">CssClass</span><span class="kwrd">=&quot;headLinksBar&quot;</span> </pre>
<p>&#160;</p>
<pre class="alt">    <span class="attr">CssSelectorClass</span><span class="kwrd">=&quot;SimpleEntertainmentMenu&quot;</span>     <span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>    <span class="kwrd">&lt;/</span><span class="html">asp:Menu</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">asp:Content</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>&#160;</pre>
</p></div>
<h3>And the Benefits&#8230;</h3>
<ul>
<li>You have no .net code to write! </li>
<li>Adding new menu items as Primary or Secondary is easy </li>
<li>Security is completely taken care of </li>
<li>Menu Entries Automatically come and go based on User Permission&#160; </li>
</ul>
<h2>Not Using the <a href="http://www.codeplex.com/cssfriendly" target="_blank"></p>
<p>CSS Friendly Adapters</p>
<p>    </a></h2>
<p>If you do not use the CSS Friendly Adapter library, the menu render using tables.&#160; <br />Below is what the actual HTML looks like of the main menu if I remove the</p>
<p><a href="http://www.codeplex.com/cssfriendly" target="_blank">CSS Friendly Adapters</a>.</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">table</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>    <span class="kwrd">&lt;</span><span class="html">a</span> <span class="attr">href</span><span class="kwrd">=&quot;#ctl00_mainMenu_SkipLink&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">        <span class="kwrd">&lt;</span><span class="html">img</span> <span class="attr">alt</span><span class="kwrd">=&quot;Skip Navigation Links&quot;</span> <span class="attr">src</span><span class="kwrd">=&quot;/WebStyleOnly%20-%20Copy/WebResource.axd?d=G5&quot;</span> <span class="attr">width</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">height</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">style</span><span class="kwrd">=&quot;border-width: 0px;&quot;</span> <span class="kwrd">/&gt;</span></pre>
<p>&#160;</p>
<pre>    <span class="kwrd">&lt;/</span><span class="html">a</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">    <span class="kwrd">&lt;</span><span class="html">table</span> <span class="attr">id</span><span class="kwrd">=&quot;ctl00_mainMenu&quot;</span> <span class="attr">class</span><span class="kwrd">=&quot;headLinksBar ctl00_mainMenu_2&quot;</span> <span class="attr">cssselectorclass</span><span class="kwrd">=&quot;SimpleEntertainmentMenu&quot;</span> <span class="attr">cellpadding</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">cellspacing</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">border</span><span class="kwrd">=&quot;0&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>        <span class="kwrd">&lt;</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">            <span class="kwrd">&lt;</span><span class="html">td</span> <span class="attr">onmouseover</span><span class="kwrd">=&quot;Menu_HoverStatic(this)&quot;</span> <span class="attr">onmouseout</span><span class="kwrd">=&quot;Menu_Unhover(this)&quot;</span> <span class="attr">onkeyup</span><span class="kwrd">=&quot;Menu_Key(this)&quot;</span> <span class="attr">id</span><span class="kwrd">=&quot;ctl00_mainMenun0&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                <span class="kwrd">&lt;</span><span class="html">table</span> <span class="attr">cellpadding</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">cellspacing</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">border</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">width</span><span class="kwrd">=&quot;100%&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                    <span class="kwrd">&lt;</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                        <span class="kwrd">&lt;</span><span class="html">td</span> <span class="attr">style</span><span class="kwrd">=&quot;white-space: nowrap;&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                            <span class="kwrd">&lt;</span><span class="html">a</span> <span class="attr">class</span><span class="kwrd">=&quot;ctl00_mainMenu_1&quot;</span> <span class="attr">href</span><span class="kwrd">=&quot;/WebStyleOnly%20-%20Copy/Register.aspx&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                                // REGISTER</pre>
<p>&#160;</p>
<pre class="alt">                            <span class="kwrd">&lt;/</span><span class="html">a</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                        <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                    <span class="kwrd">&lt;/</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                <span class="kwrd">&lt;/</span><span class="html">table</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">            <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>            <span class="kwrd">&lt;</span><span class="html">td</span> <span class="attr">style</span><span class="kwrd">=&quot;width: 3px;&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">            <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>            <span class="kwrd">&lt;</span><span class="html">td</span> <span class="attr">onmouseover</span><span class="kwrd">=&quot;Menu_HoverStatic(this)&quot;</span> <span class="attr">onmouseout</span><span class="kwrd">=&quot;Menu_Unhover(this)&quot;</span> <span class="attr">onkeyup</span><span class="kwrd">=&quot;Menu_Key(this)&quot;</span> <span class="attr">id</span><span class="kwrd">=&quot;ctl00_mainMenun1&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                <span class="kwrd">&lt;</span><span class="html">table</span> <span class="attr">cellpadding</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">cellspacing</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">border</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">width</span><span class="kwrd">=&quot;100%&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                <span class="kwrd">&lt;</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                    <span class="kwrd">&lt;</span><span class="html">td</span> <span class="attr">style</span><span class="kwrd">=&quot;white-space: nowrap;&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                        <span class="kwrd">&lt;</span><span class="html">a</span> <span class="attr">class</span><span class="kwrd">=&quot;ctl00_mainMenu_1&quot;</span> <span class="attr">href</span><span class="kwrd">=&quot;/WebStyleOnly%20-%20Copy/News.aspx&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                            // NEWS </pre>
<p>&#160;</p>
<pre>                        <span class="kwrd">&lt;/</span><span class="html">a</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                    <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                <span class="kwrd">&lt;/</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                <span class="kwrd">&lt;/</span><span class="html">table</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>            <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">            <span class="kwrd">&lt;</span><span class="html">td</span> <span class="attr">style</span><span class="kwrd">=&quot;width: 3px;&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>            <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">            <span class="kwrd">&lt;</span><span class="html">td</span> <span class="attr">onmouseover</span><span class="kwrd">=&quot;Menu_HoverStatic(this)&quot;</span> <span class="attr">onmouseout</span><span class="kwrd">=&quot;Menu_Unhover(this)&quot;</span> <span class="attr">onkeyup</span><span class="kwrd">=&quot;Menu_Key(this)&quot;</span> <span class="attr">id</span><span class="kwrd">=&quot;ctl00_mainMenun2&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                <span class="kwrd">&lt;</span><span class="html">table</span> <span class="attr">cellpadding</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">cellspacing</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">border</span><span class="kwrd">=&quot;0&quot;</span> <span class="attr">width</span><span class="kwrd">=&quot;100%&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                    <span class="kwrd">&lt;</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                        <span class="kwrd">&lt;</span><span class="html">td</span> <span class="attr">style</span><span class="kwrd">=&quot;white-space: nowrap;&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                            <span class="kwrd">&lt;</span><span class="html">a</span> <span class="attr">class</span><span class="kwrd">=&quot;ctl00_mainMenu_1&quot;</span> <span class="attr">href</span><span class="kwrd">=&quot;/WebStyleOnly%20-%20Copy/About.aspx&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                                // ABOUT</pre>
<p>&#160;</p>
<pre class="alt">                            <span class="kwrd">&lt;/</span><span class="html">a</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                        <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                    <span class="kwrd">&lt;/</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                <span class="kwrd">&lt;/</span><span class="html">table</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">            <span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>            <span class="kwrd">&lt;/</span><span class="html">span</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">        <span class="kwrd">&lt;/</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre><span class="kwrd">&lt;/</span><span class="html">table</span><span class="kwrd">&gt;</span></pre>
</p></div>
<p>The same code, when using the <a href="http://www.codeplex.com/cssfriendly" target="_blank">CSS Friendly adapters</a>, plus some clever additions that will be discussed later, has the html code looking like the following.</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">table</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>    <span class="kwrd">&lt;</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">        <span class="kwrd">&lt;</span><span class="html">div</span> <span class="attr">class</span><span class="kwrd">=&quot;AspNet-Menu-Horizontal&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>            <span class="kwrd">&lt;</span><span class="html">ul</span> <span class="attr">class</span><span class="kwrd">=&quot;AspNet-Menu&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                <span class="kwrd">&lt;</span><span class="html">li</span> <span class="attr">class</span><span class="kwrd">=&quot;AspNet-Menu-TopLevel-register&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                    <span class="kwrd">&lt;</span><span class="html">a</span> <span class="attr">href</span><span class="kwrd">=&quot;/WebStyleOnly - Copy/Register.aspx&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                      REGISTER</pre>
<p>&#160;</p>
<pre>                     <span class="kwrd">&lt;/</span><span class="html">a</span><span class="kwrd">&gt;</span> </pre>
<p>&#160;</p>
<pre class="alt">                <span class="kwrd">&lt;/</span><span class="html">li</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                 <span class="kwrd">&lt;</span><span class="html">li</span> <span class="attr">class</span><span class="kwrd">=&quot;AspNet-Menu-TopLevel-news&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                    <span class="kwrd">&lt;</span><span class="html">a</span> <span class="attr">href</span><span class="kwrd">=&quot;/WebStyleOnly - Copy/News.aspx&quot;</span><span class="kwrd">&gt;</span>NEWS<span class="kwrd">&lt;/</span><span class="html">a</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                <span class="kwrd">&lt;/</span><span class="html">li</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                <span class="kwrd">&lt;</span><span class="html">li</span> <span class="attr">class</span><span class="kwrd">=&quot;AspNet-Menu-TopLevel-about-Selected&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                    <span class="kwrd">&lt;</span><span class="html">a</span> <span class="attr">href</span><span class="kwrd">=&quot;/WebStyleOnly - Copy/About.aspx&quot;</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">                      ABOUT<span class="kwrd">&lt;/</span><span class="html">a</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>                <span class="kwrd">&lt;/</span><span class="html">li</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">            <span class="kwrd">&lt;/</span><span class="html">ul</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre>         <span class="kwrd">&lt;/</span><span class="html">div</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre class="alt">     <span class="kwrd">&lt;/</span><span class="html">tr</span><span class="kwrd">&gt;</span></pre>
<p>&#160;</p>
<pre> <span class="kwrd">&lt;/</span><span class="html">table</span><span class="kwrd">&gt;</span></pre>
</p></div>
<p>You can see that the CSS adapter code is not only much smaller, but easier to read and because of the inserted class names, much easier to customize.</p>
<h2>Conclusions</h2>
<p>We have not made clear yet how the CSS Friendly Adapters will make the menu&#8217;s work the way we want it to. We have shown css classes created (AspNet-Menu-TopLevel-about-Selected for example) are create by the custom code written by us in the CSS Friendly Adapter Project.&#160; We have however talked about the menu control and showed an example of how the html is actually rendered, and what is rendered based on.&#160; That is, the web.sitemap defines the menu and we have shown that.&#160; In the next article, we will show details of the custom code we have in the CSS Friendly Adapter that solves the problem of how to highlight the menu choices based on what is clicked.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2008/05/19/codecampwebsiteseries2/feed/</wfw:commentRss>
		<slash:comments>76</slash:comments>
		</item>
		<item>
		<title>Best Practices for Building an asp.net quality web siteBuilding the New Code Camp Web Site (Part 1)</title>
		<link>http://peterkellner.net/2008/05/13/codecampwebsiteseries1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=codecampwebsiteseries1</link>
		<comments>http://peterkellner.net/2008/05/13/codecampwebsiteseries1/#comments</comments>
		<pubDate>Tue, 13 May 2008 18:06:25 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[Atlas/AJAX]]></category>
		<category><![CDATA[Code Camp Web Site Series]]></category>
		<category><![CDATA[Community]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2008/05/13/codecampwebsiteseries1/</guid>
		<description><![CDATA[<p>In this article, the first steps for building a professional web site are documented.  These steps include building requirements, working with a designer and starting the process to hire a css/html person</p>]]></description>
			<content:encoded><![CDATA[<p>(That&#8217;s right, Code Camp is coming!&#160; 11/8 and 11/9 again at Foothill College)</p>
<h2>Article Series</h2>
<table border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="100">Article 1:</td>
<td valign="top" width="600"><a href="http://peterkellner.net/2008/05/13/codecampwebsiteseries1/">Best Practices for Building an ASP.NET quality web site</a></td>
</tr>
<tr>
<td>Article 2:</td>
<td><a href="http://peterkellner.net/2008/05/19/codecampwebsiteseries2/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters</a></td>
</tr>
<tr>
<td>Article 3:</td>
<td><a href="http://peterkellner.net/2008/05/25/codecampwebsiteseries3/">Creating a Theme For Each Year of Code Camp Using Skins in ASP.NET</a></td>
</tr>
<tr>
<td>Article 4:</td>
<td><a href="http://peterkellner.net/2008/06/29/sv-code-camp-web-site-series4/">Creating a Modal Login Window Using the Telerik Modal RadWindow Component</a></td>
</tr>
<tr>
<td>Article 5:</td>
<td><a href="http://peterkellner.net/2008/07/03/combine-email-lists-with-linq/">Using LINQ to Merge Mailing Lists and Filter Opt Outs</a></td>
</tr>
<tr>
<td>Article 6:</td>
<td><a href="http://peterkellner.net/2009/03/27/codecampwebsiteseries6-cssfriendly-adapters-aspnet-menu/">Multi Level ASP.NET Menu with CSS Friendly Control Adapters (The Source Code!)</a></td>
</tr>
</tbody>
</table>
<p> 
<p>So, first, a little background.&#160; As many of you know, I&#8217;ve been the ring leader of <a href="http://www.siliconvalley-codecamp.com/">Silicon Valley Code Camp</a> here in northern California for the past 2 years.&#160; Since Code Camp is a limited budget, 100% volunteer effort, the most important thing is to have efficient communications between everyone.&#160; Attendees, Speakers, Organizer, Sponsors and everyone else involved in the event.&#160; To that end, the first code camp web site was created.&#160; It was based on CSS provided by Microsoft.&#160; Check out the post I made two years ago about it titled <a href="http://peterkellner.net/2006/08/28/msprofcsshowto/">&quot;Zero to Professional Web Site in Two Days&quot;</a>.</p>
</p>
<p> <span id="more-111"></span>
</p>
<p>This year, we are planning on a different format.&#160; I don&#8217;t want to give too much away because we have not formally announced the changes, but if you look carefully at the designs, you might get an idea what these changes are going to be.&#160; I&#8217;m getting slightly off topic.&#160; The purpose of this series of articles to take you with me, step by step through building the web site.&#160; This time,    <br />we are going to do it right.&#160; Professional Designer (volunteer) and Professional CSS Implementer (not me, but we do have some budget for this from last year).</p>
<p>So, here are the steps.</p>
<ol>
<li>Decide on what changes need to be made </li>
<li>Work with a professional designer to make mock ups (photoshop, fireworks, etc.) </li>
<li>Create css and html pages from the designers work </li>
<li>Implement the css and html in asp.net </li>
<li>Test </li>
<li>Publish </li>
</ol>
<p>So far, we have done steps 1,2 and are working on step 3.&#160; I&#8217;ve alluded to the requirements above, but don&#8217;t want to spoil too many surprises.&#160; Suffice to say, that is done already.&#160; Step 2 is also now complete.&#160; The professional designer gave us very detailed PSD files that we can turn over to a css wizard.&#160; First, let me show you some of the designs and peek into fireworks to see what is actually under the covers.</p>
<p>First, here are some screen shots of what pages will look like (png files created from the PSD files)</p>
<table border="0" cellspacing="0" cellpadding="2" width="400">
<tbody>
<tr>
<td valign="top" width="200"><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/svc-home2.png">           <br /><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="svc_home[2]" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/svc-home2-thumb.png" width="244" height="224" /></a>           </td>
<td valign="top" width="200"><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/svc-news.png">           <br /><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="svc_news" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/svc-news-thumb.png" width="244" height="224" /></a>           </td>
</tr>
<tr>
<td valign="top" width="200"><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/svc-reg.png">           <br /><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="svc_reg" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/svc-reg-thumb.png" width="244" height="224" /></a>           </td>
<td valign="top" width="200"><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/svc-sessions.png">           <br /><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="svc_sessions" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/svc-sessions-thumb.png" width="244" height="224" /></a>           </td>
</tr>
</tbody>
</table>
<p>Include is also a PDF file.&#160; It allows the person doing the css and html to really do a good job of pulling the pieces apart to make great web content.</p>
<p><a href="http://peterkellner.net/wp/wp-content/uploads/2008/05/fw.jpg"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="fw" src="http://peterkellner.net/wp/wp-content/uploads/2008/05/fw-thumb.jpg" width="376" height="445" /></a></p>
<p>(notice the detailed names for all the layers!&#160; this kind of consistency makes it much easier to implement in html and css).</p>
<p>Step 3 is to hand this over to a designer.&#160; I did not have someone to use locally, so I decided to take a shot at using <a href="http://www.rentacoder.com">rentacoder</a>.&#160; I posted a detailed specification which you can see on that site if you navigate to this url:&#160; <a title="http://www.rentacoder.com./RentACoder/misc/BidRequests/ShowBidRequest.asp?lngBidRequestId=924960" href="http://www.rentacoder.com./RentACoder/misc/BidRequests/ShowBidRequest.asp?lngBidRequestId=924960">     <br />http://www.rentacoder.com./RentACoder/misc/BidRequests/ShowBidRequest.asp?lngBidRequestId=924960</a>&#160; </p>
<p>Notice the detailed specifications as well as the 13 bids that have been made ranging from $100 to $1000.&#160; I posted a question on the forums asking if anyone had used any of these services and the response was yes, but don&#8217;t take the lowest bid and also make sure you use someone with lots of experience.&#160; I haven&#8217;t decided next steps yet (that is who to choose), but I will keep posting as I build this web site.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2008/05/13/codecampwebsiteseries1/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 8/38 queries in 0.078 seconds using disk: basic
Content Delivery Network via Amazon Web Services: S3: PetersBlogCDN.s3.amazonaws.com

Served from: peterkellner.net @ 2012-05-22 09:52:57 -->
