<?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>freemind blogs</title>
	<atom:link href="http://blogs.freemind.net/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.freemind.net</link>
	<description></description>
	<lastBuildDate>Thu, 19 Nov 2009 04:49:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Microsoft Earns Freemind Certified Pardner Status for 2010</title>
		<link>http://blogs.freemind.net/index.php/microsoft-earns-freemind-certified-pardner-status-for-2010/84/</link>
		<comments>http://blogs.freemind.net/index.php/microsoft-earns-freemind-certified-pardner-status-for-2010/84/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 04:49:25 +0000</pubDate>
		<dc:creator>Ira Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.freemind.net/?p=84</guid>
		<description><![CDATA[EAGAN, MN &#8211; Freemind Solutions is proud to announce that it has conveyed its &#8220;Certified Pardner&#8221; status upon the upstart software company, Microsoft Corporation. Microsoft, with its primary offices located in Redmond, Washington, has submitted three products to Freemind for its use and analysis. The results of arduous selection and review process has deemed Microsoft [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blogs.freemind.net/wp-content/uploads/2009/11/pardner.png" alt="pardner.png" border="0" width="350" align="right" />EAGAN, MN &#8211; Freemind Solutions is proud to announce that it has conveyed its &#8220;Certified Pardner&#8221; status upon the upstart software company, Microsoft Corporation. Microsoft, with its primary offices located in Redmond, Washington, has submitted three products to Freemind for its use and analysis. The results of arduous selection and review process has deemed Microsoft worthy of the status of &#8220;Certified Pardner&#8221; for 2010.</p>
<p>A media representative for Microsoft has likely contacted Freemind Solutions to thank them for this honor and to express the desire for Freemind&#8217;s coveted &#8220;Gold Pardner Status&#8221; for 2011. &#8220;It&#8217;s a solid goal for a rather plucky outfit,&#8221; said James Swanson, one of the principals at Freemind Solutions on Microsoft&#8217;s 2011 ambitions. Ira Mitchell, another principal at the firm chimed in, &#8220;I think they&#8217;ve got a shot at it, but it won&#8217;t be because of Expression Studio or IE8.&#8221;</p>
<p>&#8220;I&#8217;m thinking that they probably shouldn&#8217;t submit the Entity Framework either,&#8221; said Swanson, &#8220;but that new Visual Studio and what they&#8217;re doing with Azure could be enough to put them over the top. It&#8217;s early though, we&#8217;ll have to take a closer look later next year.&#8221;</p>
<p>Congratulations to Microsoft Corporation for this momentous achievement! The lucite plaque is in the mail. </p>
<p><strong><br />
In related news, Freemind Solutions has qualified as a Microsoft Certified Partner for the third consecutive year.</strong></p>
<p><br/><br />
<br/></p>
<p><strong><br />
About the companies:<br />
</strong></p>
<p><em>Microsoft Corporation</em> is a multinational computer technology corporation that develops, manufactures, licenses, and supports a wide range of software products for computing devices.</p>
<p><em>Freemind Solutions</em>, an Eagan, Minnesota corporation is a highly regarded professional services firm. Their client background includes litigation support, finance, government services, commercial and retail. For more information, please contact them at (612) 424-9699 or my emailing them at <a href="mailto:info@freemind.net">info@freemind.net</a>.</p>
<p>&#8212;</p>
<p>A number of writers contributed to this release.</p>
<p>© 2009 The Freemind Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed. Learn more about our Privacy Policy.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.freemind.net/index.php/microsoft-earns-freemind-certified-pardner-status-for-2010/84/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCF REST Starter Kit to Constant Contact Sample Application</title>
		<link>http://blogs.freemind.net/index.php/wcf-rest-starter-kit-to-constant-contact-sample-application/73/</link>
		<comments>http://blogs.freemind.net/index.php/wcf-rest-starter-kit-to-constant-contact-sample-application/73/#comments</comments>
		<pubDate>Fri, 22 May 2009 17:23:21 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.freemind.net/?p=73</guid>
		<description><![CDATA[I&#8217;ve had a few requests to get more details on how I used the WCF REST Starter Kit to integrate with the Constant Contact AtomPub API (posted here). It&#8217;s shamefully simple but here it is. If you are not satisfied I will give you your money back.
Requires:

.NET Framework 3.51
WCF REST Starter Kit Preview 2
NUnit/Log4net (included)
Constant [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a few requests to get more details on how I used the WCF REST Starter Kit to integrate with the Constant Contact AtomPub API (<a href="http://blogs.freemind.net/index.php/using-wcf-rest-starter-kit-to-access-constant-contact-api/57/">posted here</a>). It&#8217;s shamefully simple but here it is. If you are not satisfied I will give you your money back.</p>
<p>Requires:</p>
<ul>
<li>.NET Framework 3.51</li>
<li><a title="WCF REST Starter Kit Preview 2" href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24644">WCF REST Starter Kit Preview 2</a></li>
<li>NUnit/Log4net (included)</li>
<li><a href="http://developer.constantcontact.com/DWSHome">Constant Contact Developer Account</a></li>
</ul>
<p><a href="http://freemind.net/downloads/ConstantContact WCF REST Sample.zip">Download Sample App</a></p>
<p>Notes:</p>
<ul>
<li>Update the app.config with your account settings from Constant Contact.</li>
<li>Sample is using Http Digest for authentication. If there is interest I can update for OAuth.</li>
</ul>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Configuration</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span><br />
<span style="color: #0600FF;">using</span> <span style="color: #008080;">Freemind.Domain.Email</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF;">namespace</span> Freemind.<span style="color: #0000FF;">ConstantContactSample</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #FF0000;">class</span> Program<br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> Main<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> args<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0600FF;">try</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Begin loading Contact Lists&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Connect and list Contact Lists</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ContactListProvider provider <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ContactListProvider<span style="color: #000000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ConfigurationManager.<span style="color: #0000FF;">AppSettings</span><span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;ConstantContactAccountName&quot;</span><span style="color: #000000;">&#93;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ConfigurationManager.<span style="color: #0000FF;">AppSettings</span><span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;ConstantContactPassword&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List lists <span style="color: #008000;">=</span> provider.<span style="color: #0000FF;">GetContactLists</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>lists <span style="color: #008000;">!=</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>ContactList list <span style="color: #0600FF;">in</span> lists<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot; &nbsp;list:{0} id:{1}&quot;</span>, list.<span style="color: #0000FF;">Name</span>, list.<span style="color: #0000FF;">id</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Completed loading Contact Lists&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Press any key to quit&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.<span style="color: #0000FF;">ReadKey</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0600FF;">catch</span> <span style="color: #000000;">&#40;</span>Exception ex<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Error: {0}&quot;</span>,ex.<span style="color: #0000FF;">Message</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.freemind.net/index.php/wcf-rest-starter-kit-to-constant-contact-sample-application/73/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using WCF REST Starter Kit to Access Constant Contact API</title>
		<link>http://blogs.freemind.net/index.php/using-wcf-rest-starter-kit-to-access-constant-contact-api/57/</link>
		<comments>http://blogs.freemind.net/index.php/using-wcf-rest-starter-kit-to-access-constant-contact-api/57/#comments</comments>
		<pubDate>Fri, 01 May 2009 19:30:37 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[atompub]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[wcf]]></category>

		<guid isPermaLink="false">http://blogs.freemind.net/?p=57</guid>
		<description><![CDATA[Problem: Allow customers to sign up for email newsletters and synchronize those accounts with Constant Contact.
Constant Contact is a company that provides Email Marketing services. You can use their editor to create nice looking emails and then configure a list of contacts. Constant Contact handles all the email sending, bounces, and unsubscribe activities. They also [...]]]></description>
			<content:encoded><![CDATA[<p>Problem: Allow customers to sign up for email newsletters and synchronize those accounts with Constant Contact.</p>
<p><a title="Constant Contact" href="http://constantcontact.com" target="_blank">Constant Contact</a> is a company that provides Email Marketing services. You can use their editor to create nice looking emails and then configure a list of contacts. Constant Contact handles all the email sending, bounces, and unsubscribe activities. They also provide excellent reporting features to track how many people actually view your emails or click on the contained links.</p>
<p>The nice folks at Constant Contact provide a set of <a href="http://developer.constantcontact.com/doc" target="_blank">web services </a>for accessing account data. These interfaces are implemented as REST services utilizing the Atom Publication Protocol (AtomPub) and Atom Syndication Format. At first it might seem odd to be accessing data objects via a <em>blogging</em> protocol but it actually works quite naturally. So well that Google&#8217;s GData and Microsoft&#8217;s ADO.NET Data Services also support this technique.</p>
<p>Writing all the HTTP, Auth, and XML parsing code can be a real drag. Luckily Microsoft is releasing a <a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24644" target="_blank">WCF REST Starter Kit</a>. From the CodePlex summary:</p>
<blockquote><p><span id="ctl00_ctl00_MasterContent_Content_wikiSourceLabel">The WCF REST Starter Kit is a set of .Net Framework classes and Visual Studio features and templates that enable users to create and access REST-style Windows Communication Foundation (WCF) services. These services are based on the WCF web programming model available in .Net 3.5 SP1. The starter kit also contains the full source code for all features, detailed code samples, and unit tests.</span></p></blockquote>
<p>This starter kit makes accessing the Constant Contact API quite simple. Call GetEntry or GetFeed with a URI and get back a SyndicationItem or SyndicationFeed (collection of items). Similar methods exist for adding and updating data (AddEntry and UpdateEntry).</p>
<p>The following is one method from my ContactListProvider class:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF;">public</span> ContactList GetContactList<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> id<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;AtomPubClient client <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> AtomPubClient<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;client.<span style="color: #0000FF;">TransportSettings</span>.<span style="color: #0000FF;">Credentials</span> <span style="color: #008000;">=</span> GetLoginCredentials<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// Place in a try block to ensure that any errors are caught</span><br />
&nbsp; &nbsp;<span style="color: #0600FF;">try</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; SyndicationItem item <span style="color: #008000;">=</span> client.<span style="color: #0000FF;">GetEntry</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Uri<span style="color: #000000;">&#40;</span>id<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; ContactList list <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ContactList<span style="color: #000000;">&#40;</span>item.<span style="color: #0000FF;">Content</span> <span style="color: #0600FF;">as</span> XmlSyndicationContent<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">return</span> list<span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #0600FF;">catch</span> <span style="color: #000000;">&#40;</span>WebException ex<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; _log.<span style="color: #0000FF;">Error</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;WebException: &quot;</span> <span style="color: #008000;">+</span> ex.<span style="color: #0000FF;">Status</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot; &quot;</span> <span style="color: #008000;">+</span> ex.<span style="color: #0000FF;">Message</span>, ex<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">return</span> null<span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #0600FF;">catch</span> <span style="color: #000000;">&#40;</span>Exception ex<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// Get the exception type</span><br />
&nbsp; &nbsp; &nbsp; _log.<span style="color: #0000FF;">Error</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Exception: &quot;</span> <span style="color: #008000;">+</span> ex.<span style="color: #0000FF;">Message</span>, ex<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">return</span> null<span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Contact me via comments if you want a copy of all the providers.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.freemind.net/index.php/using-wcf-rest-starter-kit-to-access-constant-contact-api/57/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to convert UPC-A to zero-compressed UPC-E</title>
		<link>http://blogs.freemind.net/index.php/how-to-convert-upc-a-to-zero-compressed-upc-e/56/</link>
		<comments>http://blogs.freemind.net/index.php/how-to-convert-upc-a-to-zero-compressed-upc-e/56/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 22:59:32 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[upc]]></category>
		<category><![CDATA[yucky]]></category>

		<guid isPermaLink="false">http://blogs.freemind.net/?p=56</guid>
		<description><![CDATA[Universal Product Codes (UPCs) should be a very straight-forward topic. You give a product a number and that is the end of the story. Unfortunately it turns out to be a bit more complicated than that.
There is a great (well I guess that&#8217;s subjective) page on Wikipedia that does an excellent job explaining all the [...]]]></description>
			<content:encoded><![CDATA[<p>Universal Product Codes (UPCs) should be a very straight-forward topic. You give a product a number and that is the end of the story. Unfortunately it turns out to be a bit more complicated than that.</p>
<p>There is a great (well I guess that&#8217;s subjective) page on Wikipedia that does an excellent job explaining all the variations: <a title="Universal Product Codes" href="http://en.wikipedia.org/wiki/Universal_Product_Code" target="_blank">Universal Product Codes</a>. There are 14, 13, 12, 11, 10, 8, and 6 digit types of UPCs. There is also an interesting algorithm to convert from a fairly standard 12-digit UPC-A code into a zero-compressed UPC-E. This is a most uninteresting fact. Until the day comes when you actually have to convert some of these codes.</p>
<p>Here is some C# code to:</p>
<ul>
<li>Convert UPC-A codes to UPC-E</li>
<li>Convert UPC-E codes to UPC-A</li>
<li>Calculate check digits</li>
</ul>
<p>If google brought you here because you need these conversions then bask is it&#8217;s yucky goodness! If not, then just move right along (basically it&#8217;s a cup with dirt in it).</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> ConvertUPCAToUPCE<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> UPCa<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #FF0000;">string</span> UPCe <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">//Must be 12 digits</span><br />
&nbsp; &nbsp;<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>UPCa.<span style="color: #0000FF;">Length</span> <span style="color: #008000;">!=</span> 12<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">return</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #FF0000;">string</span> mfg <span style="color: #008000;">=</span> UPCa.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span> 1, 5<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #FF0000;">string</span> prod <span style="color: #008000;">=</span> UPCa.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>6, 5<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>mfg.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">==</span> <span style="color: #666666;">&quot;000&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">||</span> <span style="color: #000000;">&#40;</span>mfg.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">==</span> <span style="color: #666666;">&quot;100&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">||</span><span style="color: #000000;">&#40;</span>mfg.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">==</span> <span style="color: #666666;">&quot;200&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XXNNN0 &nbsp;0XX000-00NNN + check</span><br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// &nbsp;1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XXNNN1 &nbsp;0XX100-00NNN + check</span><br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// &nbsp;2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XXNNN2 &nbsp;0XX200-00NNN + check</span><br />
&nbsp; &nbsp; &nbsp; UPCe <span style="color: #008000;">=</span> mfg.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>0, 2<span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> prod.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>2, 3<span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> mfg.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>2, 1<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #0600FF;">else</span> <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>mfg.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">3</span>,<span style="color: #FF0000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">==</span> <span style="color: #666666;">&quot;00&quot;</span><span style="color: #000000;">&#41;</span> &nbsp; <br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// &nbsp;3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XXXNN3 &nbsp;0XXX00-000NN + check</span><br />
&nbsp; &nbsp; &nbsp; UPCe <span style="color: #008000;">=</span> mfg.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span>,<span style="color: #FF0000;">3</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> prod.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">3</span>,<span style="color: #FF0000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;3&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #0600FF;">else</span> <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>mfg.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">4</span>, <span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">==</span> <span style="color: #666666;">&quot;0&quot;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// &nbsp;4 &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XXXXN4 &nbsp;0XXXX0-0000N + check</span><br />
&nbsp; &nbsp; &nbsp; UPCe <span style="color: #008000;">=</span> mfg.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span>, <span style="color: #FF0000;">4</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> prod.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">4</span>,<span style="color: #FF0000;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;4&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #0600FF;">else</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// &nbsp;5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XXXXX5 &nbsp;0XXXXX-00005 + check</span><br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// &nbsp;6 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XXXXX6 &nbsp;0XXXXX-00006 + check</span><br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// &nbsp;7 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XXXXX7 &nbsp;0XXXXX-00007 + check</span><br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// &nbsp;8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XXXXX8 &nbsp;0XXXXX-00008 + check</span><br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// &nbsp;9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XXXXX9 &nbsp;0XXXXX-00009 + check</span><br />
&nbsp; &nbsp; &nbsp; UPCe <span style="color: #008000;">=</span> mfg <span style="color: #008000;">+</span> prod.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>4<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #0600FF;">return</span> UPCe<span style="color: #008000;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> ConvertUPCEToUPCA<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> UPCe<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">//Must be 12 digits</span><br />
&nbsp; &nbsp;<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>UPCe.<span style="color: #0000FF;">Length</span> <span style="color: #008000;">!=</span> 6<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">return</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #FF0000;">string</span> mfg <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #FF0000;">string</span> prod <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #0600FF;">switch</span> <span style="color: #000000;">&#40;</span>UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>5, 1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">case</span> <span style="color: #666666;">&quot;0&quot;</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mfg <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;0&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span>, <span style="color: #FF0000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;000&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;prod <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;00&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>2, 3<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">case</span> <span style="color: #666666;">&quot;1&quot;</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mfg <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;0&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span>, <span style="color: #FF0000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;100&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;prod <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;00&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>2, 3<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">case</span> <span style="color: #666666;">&quot;2&quot;</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mfg <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;0&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span>, <span style="color: #FF0000;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;200&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;prod <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;00&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>2, 3<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">case</span> <span style="color: #666666;">&quot;3&quot;</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mfg <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;0&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span>, <span style="color: #FF0000;">3</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;00&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;prod <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;000&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>3, 2<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">case</span> <span style="color: #666666;">&quot;4&quot;</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mfg <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;0&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span>, <span style="color: #FF0000;">4</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;0&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;prod <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;0000&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>4, 1<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">default</span><span style="color: #008000;">:</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mfg <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;0&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>0, 5<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;prod <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;0000&quot;</span> <span style="color: #008000;">+</span> UPCe.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span>5, 1<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #0600FF;">return</span> mfg <span style="color: #008000;">+</span> prod <span style="color: #008000;">+</span> CalculateCheckDigit<span style="color: #000000;">&#40;</span>mfg <span style="color: #008000;">+</span> prod<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//In the UPC-A system, the check digit is calculated as follows:</span><br />
<span style="color: #008080; font-style: italic;">//</span><br />
<span style="color: #008080; font-style: italic;">// &nbsp;1. Add the digits in the odd-numbered positions (first, third, fifth, etc.) together and multiply by three.</span><br />
<span style="color: #008080; font-style: italic;">// &nbsp;2. Add the digits in the even-numbered positions (second, fourth, sixth, etc.) to the result.</span><br />
<span style="color: #008080; font-style: italic;">// &nbsp;3. Find the result modulo 10 (i.e. the remainder when the result is divided by 10).</span><br />
<span style="color: #008080; font-style: italic;">// &nbsp;4. If the result is not zero, subtract the result from ten.</span><br />
<span style="color: #008080; font-style: italic;">//</span><br />
<span style="color: #0600FF;">private</span> <span style="color: #FF0000;">string</span> CalculateCheckDigit<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> upc<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #FF0000;">int</span> check <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #FF0000;">char</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> chars <span style="color: #008000;">=</span> upc.<span style="color: #0000FF;">ToCharArray</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// process string from right to left</span><br />
&nbsp; &nbsp;Array.<span style="color: #0000FF;">Reverse</span><span style="color: #000000;">&#40;</span>chars<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #0600FF;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> i <span style="color: #008000;">=</span><span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>i<span style="color: #008000;">&lt;</span>chars.<span style="color: #0000FF;">Length</span><span style="color: #008000;">;</span>i<span style="color: #008000;">++</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>i <span style="color: #008000;">%</span> <span style="color: #FF0000;">2</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">!=</span> <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// even</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;check <span style="color: #008000;">+=</span> <span style="color: #FF0000;">int</span>.<span style="color: #0000FF;">Parse</span><span style="color: #000000;">&#40;</span>chars<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">else</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008080; font-style: italic;">// odd</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;check <span style="color: #008000;">+=</span> <span style="color: #000000;">&#40;</span>3 <span style="color: #008000;">*</span> <span style="color: #FF0000;">int</span>.<span style="color: #0000FF;">Parse</span><span style="color: #000000;">&#40;</span>chars<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp;check <span style="color: #008000;">=</span> check <span style="color: #008000;">%</span> <span style="color: #FF0000;">10</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>check <span style="color: #008000;">!=</span> 0<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; check <span style="color: #008000;">=</span> 10 <span style="color: #008000;">-</span> check<span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp;<span style="color: #0600FF;">return</span> check.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Update: CheckDigit right to left processing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.freemind.net/index.php/how-to-convert-upc-a-to-zero-compressed-upc-e/56/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Beware of Windows Server 2008 Network Optimization</title>
		<link>http://blogs.freemind.net/index.php/beware-of-windows-server-2008-network-optimization/53/</link>
		<comments>http://blogs.freemind.net/index.php/beware-of-windows-server-2008-network-optimization/53/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 15:48:03 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://blogs.freemind.net/?p=53</guid>
		<description><![CDATA[Problem:
Recently I was migrating some Windows Server 2003 applications to new hardware and Windows Server 2008. The applications were mostly simple ASP.NET applications using either NHibernate or ADO.NET to communicate to a Windows Server 2003 x64 box running Sql Server 2005sp3.
Each of the new Win2k8 machines were having performance issue retrieving data from the database. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong></p>
<p>Recently I was migrating some Windows Server 2003 applications to new hardware and Windows Server 2008. The applications were mostly simple ASP.NET applications using either NHibernate or ADO.NET to communicate to a Windows Server 2003 x64 box running Sql Server 2005sp3.</p>
<p>Each of the new Win2k8 machines were having performance issue retrieving data from the database. After firing up Sql Profiler I was able to see that executing a simple statement like &#8220;SELECT * FROM Store&#8221; was taking over 5sec to return 40 rows. The slowness was the same in both ADO.NET and NHibernate apps. More research from that the WinForms apps running as admin were having the same issues. And executing the queries in SSMS showed same behavior.</p>
<p><a href="http://blogs.freemind.net/wp-content/uploads/2009/03/db_slow.jpg"><img class="alignnone size-medium wp-image-54" title="db_slow" src="http://blogs.freemind.net/wp-content/uploads/2009/03/db_slow-300x137.jpg" alt="" width="300" height="137" /></a></p>
<p>So Win2k3 servers talking to the same database are running fast. Blowing my mind I found that using the Win2k8 servers to connect to a different Sql Server 2005sp2 on 32bit runs just fine (no delays). That&#8217;s right I can load the data onto a different server and see no delays!</p>
<p>If you are reading this you might be starting to form some theories. Both the Win2k3 and Win2k8 servers are on the same subnet.</p>
<p>At this point I requested help from the smart support guys from Microsoft. We verified that the Sql execution plans were not changing. We also verified the network settings on the database, Win2k3, and Win2k8 servers.</p>
<p>Next step netmon. After capturing and reviewing the netnom logs we were able to see that there were packets getting fragmented and there were long delays in sending the secondary packets. There are many newer features in Win2k8 to optimize the network performance (receive side scaling, tcp chimney offload, network direct memory access, and autotuning). Learn more here: <a href="http://support.microsoft.com/kb/951037" target="_blank">http://support.microsoft.com/kb/951037</a></p>
<p><strong>Root Cause:</strong></p>
<p>In my situation the autotuning feature was trying to adjust the tcp receive window (RWIN) and was timing out waiting for an acknowledgment from the database server. It is possible that the router was holding onto the response packet, I wasn&#8217;t able to completely correlate all the send/receives.</p>
<p>Learn more about RWIN behavior here: <a href="http://www.nerdgrind.com/speed-up-windows-vista-network-performance-with-tcp-windows-tuning/2/" target="_blank">http://www.nerdgrind.com/speed-up-windows-vista-network-performance-with-tcp-windows-tuning/2/</a></p>
<p><strong>Resolution:</strong></p>
<p>It is possible that we could have reconfigured the router to increase the frame sizes to prevent the packet fragmentation. It is also possible that change could have hidden the delays</p>
<p>The way I choose to resolve the issue was to turn off the autotuning with the following statement:</p>
<p><strong>netsh interface tcp set global autotuning=disabled</strong></p>
<p>Some network card drivers have the ability to control this setting via the advanced properties.</p>
<p><a href="http://blogs.freemind.net/wp-content/uploads/2009/03/db_fixed.jpg"><img class="alignnone size-medium wp-image-55" title="db_fixed" src="http://blogs.freemind.net/wp-content/uploads/2009/03/db_fixed-300x137.jpg" alt="" width="300" height="137" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.freemind.net/index.php/beware-of-windows-server-2008-network-optimization/53/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shopping Cart? Remove ALL hurdles for Higher Sales.</title>
		<link>http://blogs.freemind.net/index.php/shopping-cart-remove-all-hurdles-for-higher-sales/47/</link>
		<comments>http://blogs.freemind.net/index.php/shopping-cart-remove-all-hurdles-for-higher-sales/47/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 14:30:47 +0000</pubDate>
		<dc:creator>Ira Mitchell</dc:creator>
				<category><![CDATA[Ecommerce]]></category>

		<guid isPermaLink="false">http://blogs.freemind.net/?p=47</guid>
		<description><![CDATA[I just ordered a lens for my camcorder. I rarely order anything (apart from eyeglasses) from stores other than Amazon. I&#8217;ve had my issues with Amazon in the past, but realistically, with a recurring Amazon Prime membership, I&#8217;m pretty much &#8220;all-in&#8221; for them.
So today, when ordering from another store, I expected the hurdle I always [...]]]></description>
			<content:encoded><![CDATA[<p>I just ordered a lens for my camcorder. I rarely order anything (apart from eyeglasses) from stores other than Amazon. I&#8217;ve had my issues with Amazon in the past, but realistically, with a recurring Amazon Prime membership, I&#8217;m pretty much &#8220;all-in&#8221; for them.</p>
<p><a href="http://blogs.freemind.net/wp-content/uploads/2008/08/adorama_checkout_step11.png"><img class="alignright size-medium wp-image-49" title="adorama_checkout_step11" src="http://blogs.freemind.net/wp-content/uploads/2008/08/adorama_checkout_step11-300x191.png" alt="" width="300" height="191" /></a>So today, when ordering from another store, I expected the hurdle I always come across &#8212; creating a profile just to place an order. I grudgingly started the process and <strong>BAM!</strong> just as I expected it, <strong>there it <em>wasn&#8217;t</em></strong>.</p>
<p>So thrilled was I, that I <em>nearly</em> decided to create an account! Talk about little things meaning a lot. I immediately felt an affinity towards this company and even bypassed my typical finger-floating-over-the-mouse-button routine while I hem and haw about whether or not I really want the item in question.</p>
<p>All said and done, it&#8217;s ordered &#8211;something that <em>may not have happened</em> had I been forced to create the dreaded profile.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.freemind.net/index.php/shopping-cart-remove-all-hurdles-for-higher-sales/47/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why the hell am I still forced to type runat=&#8221;server&#8221; after all these years?</title>
		<link>http://blogs.freemind.net/index.php/why-the-hell-am-i-still-forced-to-type-runatserver-after-all-these-years/45/</link>
		<comments>http://blogs.freemind.net/index.php/why-the-hell-am-i-still-forced-to-type-runatserver-after-all-these-years/45/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 19:46:32 +0000</pubDate>
		<dc:creator>Ira Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://blogs.freemind.net/?p=45</guid>
		<description><![CDATA[We&#8217;ve all seen the Microsoft guys stumble over this time and time again in demos. Why are we still forced to add this? I mean, if it&#8217;s a server control (the control starts with &#8220;&#60;asp:&#8221;) it should be assumed &#8212; or added automatically by the Visual Studio IDE. What is this, the fourth version of [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve all seen the Microsoft guys stumble over this time and time again in demos. Why are we still forced to add this? I mean, if it&#8217;s a server control (the control starts with &#8220;&lt;asp:&#8221;) it should be assumed &#8212; or added automatically by the Visual Studio IDE. What is this, the fourth version of Visual Studio for .NET?</p>
<p><strong>Why is runat=&#8221;server&#8221; not the default condition?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.freemind.net/index.php/why-the-hell-am-i-still-forced-to-type-runatserver-after-all-these-years/45/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Email Templates With ASP.NET</title>
		<link>http://blogs.freemind.net/index.php/using-email-templates-with-aspnet/31/</link>
		<comments>http://blogs.freemind.net/index.php/using-email-templates-with-aspnet/31/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 21:41:33 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://blogs.freemind.net/?p=31</guid>
		<description><![CDATA[Somedays working with ASP.NET can be a treat. Especially on those days when you stumble upon some functionality you had no idea existed.
It seems like every website has some need to generate emails for things like order confirmation, password resets, or news updates. System.Net.Mail provides excellent functionality for building email messages and communicating with SMTP [...]]]></description>
			<content:encoded><![CDATA[<p>Somedays working with ASP.NET can be a treat. Especially on those days when you stumble upon some functionality you had no idea existed.</p>
<p>It seems like every website has some need to generate emails for things like order confirmation, password resets, or news updates. System.Net.Mail provides excellent functionality for building email messages and communicating with SMTP servers. But it is up to the developer to build the actual content of the message programmatically, usually by using a StringBuilder to concatenate a bunch of user-specific and common strings.</p>
<p>Turns out there is class and technique that can simplify that code quite a bit. MailDefinition is a class that allows you to build email templates and easily update the dynamic parts. </p>
<p>Check out the following code:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">void</span> GenerateOrderEmailCustomer<span style="color: #000000;">&#40;</span>Order order<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #0600FF;">try</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; MailDefinition template <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> MailDefinition<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; template.<span style="color: #0000FF;">BodyFileName</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;~/templates/CustomerOrderConfirmation.html&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; template.<span style="color: #0000FF;">From</span> <span style="color: #008000;">=</span> order.<span style="color: #0000FF;">Store</span>.<span style="color: #0000FF;">Retailer</span>.<span style="color: #0000FF;">ApplicationConfig</span>.<span style="color: #0000FF;">EmailOrderFromAddress</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; Dictionary<span style="color: #008000;">&lt;</span><span style="color: #FF0000;">string</span>, <span style="color: #FF0000;">string</span><span style="color: #008000;">&gt;</span> data <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Dictionary<span style="color: #008000;">&lt;</span><span style="color: #FF0000;">string</span>, <span style="color: #FF0000;">string</span><span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.OrderNumber&gt;&gt;&quot;</span>, order.<span style="color: #0000FF;">OrderNumber</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.Store.Name&gt;&gt;&quot;</span>, order.<span style="color: #0000FF;">Store</span>.<span style="color: #0000FF;">Name</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.Status&gt;&gt;&quot;</span>, order.<span style="color: #0000FF;">Status</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.FirstName&gt;&gt;&quot;</span>, order.<span style="color: #0000FF;">FirstName</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.LastName&gt;&gt;&quot;</span>, order.<span style="color: #0000FF;">LastName</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.Address1&gt;&gt;&quot;</span>, order.<span style="color: #0000FF;">Address1</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.Address2&gt;&gt;&quot;</span>, order.<span style="color: #0000FF;">Address2</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.City&gt;&gt;&quot;</span>, order.<span style="color: #0000FF;">City</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.State&gt;&gt;&quot;</span>, order.<span style="color: #0000FF;">State</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.Zip&gt;&gt;&quot;</span>, order.<span style="color: #0000FF;">Zip</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.PaymentMethod&gt;&gt;&quot;</span>, order.<span style="color: #0000FF;">PaymentMethod</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.Payment.CardHoldersName&gt;&gt;&quot;</span>, <span style="color: #000000;">&#40;</span>order.<span style="color: #0000FF;">Payment</span> <span style="color: #008000;">!=</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">?</span> order.<span style="color: #0000FF;">Payment</span>.<span style="color: #0000FF;">CardHoldersName</span><span style="color: #008000;">:</span><span style="color: #666666;">&quot;n/a&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.Payment.CardType&gt;&gt;&quot;</span>, <span style="color: #000000;">&#40;</span>order.<span style="color: #0000FF;">Payment</span> <span style="color: #008000;">!=</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">?</span> order.<span style="color: #0000FF;">Payment</span>.<span style="color: #0000FF;">CardType</span><span style="color: #008000;">:</span><span style="color: #666666;">&quot;n/a&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.Payment.CreditCardNumber&gt;&gt;&quot;</span>, <span style="color: #000000;">&#40;</span>order.<span style="color: #0000FF;">Payment</span> <span style="color: #008000;">!=</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">?</span> order.<span style="color: #0000FF;">Payment</span>.<span style="color: #0000FF;">CreditCardNumber</span>.<span style="color: #0000FF;">Substring</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span>, <span style="color: #FF0000;">4</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot; **** **** ****&quot;</span> <span style="color: #008000;">:</span> <span style="color: #666666;">&quot;n/a&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #FF0000;">string</span> detailTable <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>OrderDetail detail <span style="color: #0600FF;">in</span> order.<span style="color: #0000FF;">Details</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;detailTable <span style="color: #008000;">+=</span> <span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Format</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;tr&gt;&lt;td&gt;{0}&lt;/td&gt;&lt;td&gt;{1}&lt;/td&gt;&lt;/tr&gt;&quot;</span>, detail.<span style="color: #0000FF;">Quantity</span>, detail.<span style="color: #0000FF;">Name</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;order.Details&gt;&gt;&quot;</span>, detailTable<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; data.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;&lt;&lt;url&gt;&gt;&quot;</span>, <span style="color: #666666;">&quot;http://www.wineconnect.com/&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; MailMessage message <span style="color: #008000;">=</span> template.<span style="color: #0000FF;">CreateMailMessage</span><span style="color: #000000;">&#40;</span>order.<span style="color: #0000FF;">Email</span>, data, <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> LiteralControl<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; message.<span style="color: #0000FF;">IsBodyHtml</span> <span style="color: #008000;">=</span> true<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; message.<span style="color: #0000FF;">Subject</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Format</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Order Confirmation: {0} ({1})&quot;</span>, order.<span style="color: #0000FF;">Store</span>.<span style="color: #0000FF;">Name</span>, order.<span style="color: #0000FF;">OrderNumber</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; SmtpClient client <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> SmtpClient<span style="color: #000000;">&#40;</span>order.<span style="color: #0000FF;">Store</span>.<span style="color: #0000FF;">Retailer</span>.<span style="color: #0000FF;">ApplicationConfig</span>.<span style="color: #0000FF;">EmailServer</span>, order.<span style="color: #0000FF;">Store</span>.<span style="color: #0000FF;">Retailer</span>.<span style="color: #0000FF;">ApplicationConfig</span>.<span style="color: #0000FF;">EmailPort</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">//Enable SSL</span><br />
&nbsp; &nbsp; &nbsp; client.<span style="color: #0000FF;">EnableSsl</span> <span style="color: #008000;">=</span> order.<span style="color: #0000FF;">Store</span>.<span style="color: #0000FF;">Retailer</span>.<span style="color: #0000FF;">ApplicationConfig</span>.<span style="color: #0000FF;">EmailEnableSsl</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; client.<span style="color: #0000FF;">UseDefaultCredentials</span> <span style="color: #008000;">=</span> false<span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; client.<span style="color: #0000FF;">Credentials</span> <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> NetworkCredential<span style="color: #000000;">&#40;</span>order.<span style="color: #0000FF;">Store</span>.<span style="color: #0000FF;">Retailer</span>.<span style="color: #0000FF;">ApplicationConfig</span>.<span style="color: #0000FF;">EmailUsername</span>, order.<span style="color: #0000FF;">Store</span>.<span style="color: #0000FF;">Retailer</span>.<span style="color: #0000FF;">ApplicationConfig</span>.<span style="color: #0000FF;">EmailPassword</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; client.<span style="color: #0000FF;">SendCompleted</span> <span style="color: #008000;">+=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> SendCompletedEventHandler<span style="color: #000000;">&#40;</span>MailDeliveryComplete<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; client.<span style="color: #0000FF;">SendAsync</span><span style="color: #000000;">&#40;</span>message, message<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #0600FF;">catch</span> <span style="color: #000000;">&#40;</span>Exception ex<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; _log.<span style="color: #0000FF;">Error</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Error caught while sending customer order confirmation&quot;</span>, ex<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp;<span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Combined with this template:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span>Order Confirmation<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/title.html"><span style="color: #000000; font-weight: bold;">title</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/head.html"><span style="color: #000000; font-weight: bold;">head</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/table.html"><span style="color: #000000; font-weight: bold;">table</span></a> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;400&quot;</span> <span style="color: #000066;">border</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">cellpadding</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #000066;">cellspacing</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> bordercolor<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;EDF5E3&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">tr</span></a> <span style="color: #000066;">bgcolor</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#999999&quot;</span> &gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">td</span></a> <span style="color: #000066;">align</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;center&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;height: 16px&quot;</span>&gt;&lt;<a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a> <span style="color: #000066;">color</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#FFFFFF&quot;</span>&gt;</span>Order Confirmation (<span style="color: #009900;">&lt;&lt;order.OrderNumber&gt;</span>&gt;)<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">td</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">tr</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">tr</span></a>&gt;&lt;<a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">td</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;&lt;order.FirstName&gt;</span>&gt;,<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
This email confirms your order: <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
Store: <span style="color: #009900;">&lt;&lt;order.Store.Name&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
Order Status: <span style="color: #009900;">&lt;&lt;order.Status&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span>Billing Information: <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
Customer: <span style="color: #009900;">&lt;&lt;order.FirstName&gt;</span>&gt; <span style="color: #009900;">&lt;&lt;order.LastName&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
Address1: <span style="color: #009900;">&lt;&lt;order.Address1&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
Address2: <span style="color: #009900;">&lt;&lt;order.Address2&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
City: <span style="color: #009900;">&lt;&lt;order.City&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
State: <span style="color: #009900;">&lt;&lt;order.State&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
Zip: <span style="color: #009900;">&lt;&lt;order.Zip&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span>Payment Method: <span style="color: #009900;">&lt;&lt;order.PaymentMethod&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
Card Holder: <span style="color: #009900;">&lt;&lt;order.Payment.CardHoldersName&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
Card Type: <span style="color: #009900;">&lt;&lt;order.Payment.CardType&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
Card Number: <span style="color: #009900;">&lt;&lt;order.Payment.CreditCardNumber&gt;</span>&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
Order Information:<br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/table.html"><span style="color: #000000; font-weight: bold;">table</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;messageTxt&quot;</span>&gt;&lt;<a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">tr</span></a>&gt;&lt;<a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">td</span></a>&gt;</span>Qty.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">td</span></a>&gt;&lt;<a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">td</span></a>&gt;</span>Item<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">td</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">tr</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;&lt;order.Details&gt;</span>&gt;<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/table.html"><span style="color: #000000; font-weight: bold;">table</span></a>&gt;&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a><span style="color: #66cc66;">/</span>&gt;</span><br />
Your order number is <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/strong.html"><span style="color: #000000; font-weight: bold;">strong</span></a>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'&lt;&lt;url&gt;</span></span>&gt;/OrderSummary.aspx?OrderNumber=<span style="color: #009900;">&lt;&lt;order.OrderNumber&gt;</span>&gt;'&gt;<span style="color: #009900;">&lt;&lt;order.OrderNumber&gt;</span>&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/strong.html"><span style="color: #000000; font-weight: bold;">strong</span></a>&gt;</span>.<br />
Please feel free to contact us with any questions or visit our website if you need directions to our store.<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;&lt;url&gt;</span></span>&gt;&quot;&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/strong.html"><span style="color: #000000; font-weight: bold;">strong</span></a>&gt;&lt;&lt;url&gt;</span>&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/strong.html"><span style="color: #000000; font-weight: bold;">strong</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span><br />
Thank you,<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;</span>Wine Store Dudes<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/br.html"><span style="color: #000000; font-weight: bold;">br</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/td.html"><span style="color: #000000; font-weight: bold;">td</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/tr.html"><span style="color: #000000; font-weight: bold;">tr</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/table.html"><span style="color: #000000; font-weight: bold;">table</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/html.html"><span style="color: #000000; font-weight: bold;">html</span></a>&gt;</span></div></div>
<p>It generates this email:</p>
<p><a href="http://blogs.freemind.net/wp-content/uploads/2008/07/croppercapture431.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="CropperCapture[43]" src="http://blogs.freemind.net/wp-content/uploads/2008/07/croppercapture43-thumb.jpg" border="0" alt="CropperCapture[43]" width="388" height="518" /></a></p>
<p><strong>Good Stuff:</strong></p>
<p>Using this technique I was able to get rid of a bunch of string concatenation and string.Format code. The template should be much easier to maintain going forward.</p>
<p><strong>Lame:</strong></p>
<p>The way MailDefinition replaces the dynamic tokens is nice but a bit limiting. It might be fun to try using a Server.Execute method to pick up other ASP.NET goodness like data binding and advanced logic.</p>
<p>The CreateMailMessage function also requires a OwnerControl to be passed in. They could have given us an overloaded version that didn’t require this because I doubt anyone ever uses it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.freemind.net/index.php/using-email-templates-with-aspnet/31/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The ASP.NET Wiki. Microsoft Doesn&#8217;t Get It.</title>
		<link>http://blogs.freemind.net/index.php/asp-net-wiki-microsoft-does-not-understand/21/</link>
		<comments>http://blogs.freemind.net/index.php/asp-net-wiki-microsoft-does-not-understand/21/#comments</comments>
		<pubDate>Fri, 16 May 2008 16:16:09 +0000</pubDate>
		<dc:creator>Ira Mitchell</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[wiki]]></category>
		<category><![CDATA[asp.net wiki community]]></category>

		<guid isPermaLink="false">http://blogs.freemind.net/?p=21</guid>
		<description><![CDATA[I fired up the quite excellent Visual Studio today to do a little of what I do every day. In this case, as I was waiting for my project to load I noticed a link to &#8220;New Updates to the ASP.NET Wiki&#8221;. It&#8217;s been awhile since I visited the ASP.NET Wiki (likely around its February [...]]]></description>
			<content:encoded><![CDATA[<p>I fired up the quite excellent Visual Studio today to do a little of what I do every day. In this case, as I was waiting for my project to load I noticed a link to &#8220;New Updates to the ASP.NET Wiki&#8221;. It&#8217;s been awhile since I visited the <a href="http://wiki.asp.net" target="_blank">ASP.NET Wiki</a> (likely around its February 2008 release) and this seemed like something I should at least take a look at again.</p>
<p>&#8230;and it was almost exactly what I expected. Generic, awful-looking crap &#8212; with ads. It couldn&#8217;t be any more proto-typically Microsoft if they&#8217;d attached a signature 2007 or two-alpha-character suffix. I&#8217;m sure someone lobbied for <strong>Wiki.NET 2007 NT</strong>.</p>
<p>I&#8217;m a bit more keen on design aesthetics than most hard-core developers. Just a bit more interested in the user&#8217;s perspective and the utility of an application than whether it is using straight ADO.NET, the (dated) Data Access Application Block, nHibernate, or any other ORM to get data to user (and back again). As long as it works, isn&#8217;t too messy, and is snappy enough to deal with the load, I&#8217;m fine with it.</p>
<p>So, I start digging through and like most of the Microsoft properties, there is some good stuff in here. Much of the content is really solid and functionally, it&#8217;s worthy of a passing grade &#8212; if I could just see my red pen through the blood pooling in my eyes. I start to feel a bit congested and my blood-pressure starts to rise searching for content. There are navigation elements, and lists of links sprayed all over the page like&#8230; have you ever tried that acoustic ceiling spray in a can? If you have, you know what I mean. If you haven&#8217;t I beseech you to give it a try (NOTE: heed ALL warnings on the can).</p>
<p>But I digress. Here is a screenshot of the ASP.NET Wiki:</p>
<p><a href="http://blogs.freemind.net/wp-content/uploads/2008/05/aspnetwiki1.jpg"><img class="aligncenter size-full wp-image-24" title="aspnetwiki1" src="http://blogs.freemind.net/wp-content/uploads/2008/05/aspnetwiki1.jpg" alt="asp.net wiki" width="400" height="351" /></a></p>
<p>Right off the bat, the ads are both offensive and totally out of place. Maybe it&#8217;s me, but any time I see a graphical smiley, in the wild or in an ad, I immediately think I entered the wrong URL into the browser. It&#8217;s shocking. The disregard for <a href="http://www.alistapart.com/articles/whitespace" target="_blank">white space</a> is apparent throughout, but not so much as on the <a href="http://asp.net" target="_blank">asp.net</a> homepage.</p>
<p>If you&#8217;re running your browser at less than 1080 pixels wide, you&#8217;re going to see the following start to happen. I initially thought it was me and gratuitous use of the Firefox browser, but no, you&#8217;ll see the same thing in IE7. God help you if you&#8217;re stuck on that piece of garbage, 1024 x 768 development laptop you&#8217;ve been assigned at Super GloboMax Worldwide Incorporated (or Target Corporation).</p>
<p><a href="http://blogs.freemind.net/wp-content/uploads/2008/05/aspnetwiki2.jpg"><img class="aligncenter size-full wp-image-25" title="aspnetwiki2" src="http://blogs.freemind.net/wp-content/uploads/2008/05/aspnetwiki2.jpg" alt="asp.net wiki smashing" width="400" height="233" /></a></p>
<p>Again, the content is decent &#8212; if you can work your way through the phlegm.</p>
<p>Straight out of MinneRails, er, I mean <a href="http://blogs.freemind.net/index.php/minnebar-2008/19/" target="_blank">Minnebar</a> last weekend, I thought to myself, &#8220;Self, I wonder what the Rails Wiki looks like.&#8221;</p>
<p><a href="http://blogs.freemind.net/wp-content/uploads/2008/05/railswiki.jpg"><img class="aligncenter size-full wp-image-28" title="railswiki" src="http://blogs.freemind.net/wp-content/uploads/2008/05/railswiki.jpg" alt="rails wiki" width="400" height="351" /></a></p>
<p><strong>It&#8217;s as good as the ASP.NET one is bad</strong>. Simple, elegant layout. Easy to navigate. The internal pages are even better.</p>
<p><a href="http://blogs.freemind.net/wp-content/uploads/2008/05/railsdev.jpg"><img class="aligncenter size-full wp-image-27" title="railsdev" src="http://blogs.freemind.net/wp-content/uploads/2008/05/railsdev.jpg" alt="rails dev" width="400" height="351" /></a></p>
<p>One step further and you see what the actual content looks like.</p>
<p><a href="http://blogs.freemind.net/wp-content/uploads/2008/05/railsvalidate.jpg"><img class="aligncenter size-full wp-image-29" title="railsvalidate" src="http://blogs.freemind.net/wp-content/uploads/2008/05/railsvalidate.jpg" alt="rails wiki content" width="400" height="298" /></a></p>
<p>There is the information I want. The sparseness is wonderful, isn&#8217;t it? <strong>I want to cuddle with this ad-free, feature-rich, information-packed, easily-navigable, simple wiki &#8212; and I don&#8217;t do Rails.</strong></p>
<p>I have three things to offer to Microsoft, the team behind the ASP.NET wiki <em>(<a href="http://www.hanselman.com/blog/ASPNETWikiBeta.aspx" target="_blank">Scott</a><a href="http://www.hanselman.com/blog/ASPNETWikiBeta.aspx" target="_blank"> Hanselman</a>, <a href="http://telligent.com" target="_blank">Telligent</a>)</em>, and really anyone trying to build a community around a product they are selling or supporting. First, just because you are a for-profit entity, <strong>doesn&#8217;t mean you need to monetize every single page of your content</strong> with banner ads or the google equivalent. Communities work better and (maybe this is where Microsoft is missing the boat) <strong>feel more natural if as a member you&#8217;re not constantly being marketed to</strong>. Secondly, use the right tool for the job. I know SharePoint and the .NET-based portals are going to be your first choice based on the user base, but are they the best bet? Not by a long shot for something like this. Thirdly, I see (the very google-esque) &#8220;beta&#8221; in the wiki title. <strong>Please consider some serious changes before this becomes &#8220;production code&#8221;.</strong></p>
<p>Maybe a tool like <a href="http://www.screwturn.eu/" target="_blank">ScrewTurn</a> Wiki is a better option. At the very least it would be a refreshing change to this nightmare.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.freemind.net/index.php/asp-net-wiki-microsoft-does-not-understand/21/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minnebar 2008</title>
		<link>http://blogs.freemind.net/index.php/minnebar-2008/19/</link>
		<comments>http://blogs.freemind.net/index.php/minnebar-2008/19/#comments</comments>
		<pubDate>Sat, 10 May 2008 21:21:41 +0000</pubDate>
		<dc:creator>Ira Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.freemind.net/?p=19</guid>
		<description><![CDATA[Jim and I went to Minnebar this morning at Coffman Union on the campus of the University of Minnesota &#8212; 398 geeks and us. We hit three sessions and then went to the &#8220;State of the State&#8221; panel discussion with Jamie Thingelstad (former Dow Jones), Robert Stephens (Geek Squad), Dan Grigsby (Unpossible), Matthew Downquast (Crashplan), [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://barcamp.org/MinneBar"><img class="alignright size-full wp-image-20" title="minnebar-logo-small" src="http://blogs.freemind.net/wp-content/uploads/2008/05/minnebar-logo-small.png" alt="" width="250" height="60" /></a>Jim and I went to Minnebar this morning at Coffman Union on the campus of the University of Minnesota &#8212; 398 geeks and us. We hit three sessions and then went to the &#8220;State of the State&#8221; panel discussion with Jamie Thingelstad (former Dow Jones), Robert Stephens (Geek Squad), Dan Grigsby (Unpossible), Matthew Downquast (Crashplan), Douglas Olson (Microsoft), and Michael Gorman (Split Rock Partners).</p>
<p>They&#8217;re all really smart guys who are uniquely qualified to speak on the state of software in Minnesota, even if they did contradict themselves on one key point. They were all in agreement that Minnesota is a great place to build a development team &#8212; that it has a great community of developers and that our Midwestern work-ethic and loyalty are things that contribute to that, that we tend to be more thoughtful and risk-adverse. Only moments later, talk shifted to the need for developers as entrepreneurs to take the chances to start the next start-ups. Apparently our weakness needs to be our strength. All that considered, I could have listened to these guys for two or three hours.</p>
<p>It&#8217;s been many years since I first sat in a room listening to Robert Stephens talk about geek squad &#8212; back when they had the place in the Warehouse district. If you ever get a chance to hear him speak, take it. Actually, if you ever get a chance to hang out with any of these guys and listen to them, drop what you&#8217;re doing and make it happen.</p>
<p>One more point that hit home with me is that the University of Minnesota is a great school, but that it&#8217;s our duty collectively to do what we can to improve the state of the Computer Science and Business programs through mentoring, offering internships and with our wallets.</p>
<p>It&#8217;s amazing how prevalent the Rails stuff has gotten. Every session we attended had a Rails tie-in it seemed. Open-source is the buzzword with the development community to be sure. Everyone is looking to maximize the dollars spent on tools with the excellent free offerings.</p>
<p>All in all, I wish I had been able to stay for the entire event, but holding the whole Mother&#8217;s Day weekend thing (and my mom&#8217;s birthday) threw a monkey wrench into the works.</p>
<p>Good stuff. Thanks to Ben and all who helped organize this thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.freemind.net/index.php/minnebar-2008/19/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
