<?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>dougv.com « Doug Vanderweide &#187; MSDN</title>
	<atom:link href="http://www.dougv.com/tag/msdn/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dougv.com</link>
	<description>ASP.NET, PHP, XML, JavaScript, Web geekery, Entrepreneurship</description>
	<lastBuildDate>Thu, 17 May 2012 22:33:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Disable Windows Antivirus When Installing aspell English Dictionary</title>
		<link>https://www.dougv.com/2012/02/29/disable-windows-antivirus-when-installing-aspell-english-dictionary/</link>
		<comments>https://www.dougv.com/2012/02/29/disable-windows-antivirus-when-installing-aspell-english-dictionary/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 19:49:35 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[Help Desk]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[developer tools]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[notepad++]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.dougv.com/?p=4244</guid>
		<description><![CDATA[When installing Kevin Atkison's English dictionary for aspell, disable your antivirus program, or the install will silently fail.<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2008/04/21/adobe-creative-suite-3-automatic-updates-and-windows-vista-issues/" rel="bookmark">Adobe Creative Suite 3 Automatic Updates And Windows Vista Issues</a> (15.2)</li>
				<li><a href="https://www.dougv.com/2008/12/29/how-to-take-a-screen-shot-windows-mac-os-x-and-linux/" rel="bookmark">How To Take A Screen Shot: Windows, Mac OS X And Linux</a> (14.1)</li>
				<li><a href="https://www.dougv.com/2008/01/01/a-windows-shell-script-to-automatically-rename-and-move-images-to-a-new-folder/" rel="bookmark">A Windows Shell Script To Automatically Rename And Move Images To A New Folder</a> (13.5)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>A lesson I learned the hard way today, while installing <a href="http://aspell.net/win32/" target="_blank">aspell</a> support for Notepad++:</p>
<p>If you&#8217;re installing <a href="http://wordlist.sourceforge.net/" target="_blank">Kevin Atkison&#8217;s English dictionary</a> for aspell, you need to disable your antivirus program (at least, if you&#8217;re using <a href="http://www.avast.com/en-us/index" target="_blank">Avast</a>, as I am). </p>
<p>If you don&#8217;t, the dictionary installer can&#8217;t write its unpacked files to disk and will fail silently. As in, it just plain closes, and Notepad++ will report something along the lines of &#8220;Aspell and/or dictionaries are missing.&#8221;</p>
<p>FYI.</p>
<p>Also, if you haven&#8217;t heard of <a href="http://notepad-plus-plus.org/" target="_blank">Notepad++</a>, you should check it out. It&#8217;s an open-source, GPL-licensed Win32 text editor. (It runs perfectly fine in Win64).</p>
<p>Highly extensible via plugins, translated to all kinds of languages, exceptionally powerful, with support for syntax highlighting in just about every programming language under the Sun and syntax checking for a fair number of them, too. </p>
<p>It&#8217;s pretty much the only tool I use any more for Web coding, even when writing <a href="http://www.asp.net/web-forms" target="_blank">ASP.NET Web Forms</a>. (I still use <a href="http://msdn.microsoft.com/en-us/vstudio/aa718325" target="_blank">Visual Studio</a> for some Windows coding. But Notepad++ has completely replaced <a href="http://www.adobe.com/products/dreamweaver.html" target="_blank">Dreamweaver</a>.)</p>
<p>All links in this post on delicious: <a href="http://delicious.com/dougvdotcom/disable-windows-antivirus-when-installing-aspell-english-dictionary" target="_blank">http://delicious.com/dougvdotcom/disable-windows-antivirus-when-installing-aspell-english-dictionary</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2008/04/21/adobe-creative-suite-3-automatic-updates-and-windows-vista-issues/" rel="bookmark">Adobe Creative Suite 3 Automatic Updates And Windows Vista Issues</a> (15.2)</li>
				<li><a href="https://www.dougv.com/2008/12/29/how-to-take-a-screen-shot-windows-mac-os-x-and-linux/" rel="bookmark">How To Take A Screen Shot: Windows, Mac OS X And Linux</a> (14.1)</li>
				<li><a href="https://www.dougv.com/2008/01/01/a-windows-shell-script-to-automatically-rename-and-move-images-to-a-new-folder/" rel="bookmark">A Windows Shell Script To Automatically Rename And Move Images To A New Folder</a> (13.5)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/developer-tools/" title="developer tools" rel="tag">developer tools</a>, <a href="https://www.dougv.com/tag/microsoft/" title="Microsoft" rel="tag">Microsoft</a>, <a href="https://www.dougv.com/tag/msdn/" title="MSDN" rel="tag">MSDN</a>, <a href="https://www.dougv.com/tag/notepad/" title="notepad++" rel="tag">notepad++</a>, <a href="https://www.dougv.com/tag/open-source/" title="open source" rel="tag">open source</a>, <a href="https://www.dougv.com/tag/visual-studio/" title="Visual Studio" rel="tag">Visual Studio</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2012/02/29/disable-windows-antivirus-when-installing-aspell-english-dictionary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parent-Child DropDownList Controls In ASP.NET Web Forms (VB.NET)</title>
		<link>https://www.dougv.com/2011/12/25/parent-child-dropdownlist-controls-in-asp-net-web-forms-vb-net/</link>
		<comments>https://www.dougv.com/2011/12/25/parent-child-dropdownlist-controls-in-asp-net-web-forms-vb-net/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 20:44:40 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Stored Procedures]]></category>
		<category><![CDATA[Transact-SQL]]></category>
		<category><![CDATA[Web Forms]]></category>
		<category><![CDATA[drop down / select list]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[ZIP Code database]]></category>

		<guid isPermaLink="false">http://www.dougv.com/?p=3950</guid>
		<description><![CDATA[Discusses three approaches to databinding child values in an ASP.NET DropDownList, based on parent DropDownList selections.<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2009/06/21/parent-child-select-lists-revisited-multiple-parent-child-select-lists-via-php-mysql-and-jquery/" rel="bookmark">Parent &#8211; Child Select Lists Revisited: Multiple Parent &#8211; Child Select Lists Via PHP, MySQL And jQuery</a> (28.7)</li>
				<li><a href="https://www.dougv.com/2011/04/24/automatically-hash-tagging-text-with-asp-net-web-forms-vb-net/" rel="bookmark">Automatically Hash Tagging Text With ASP.NET Web Forms (VB.NET)</a> (25)</li>
				<li><a href="https://www.dougv.com/2009/04/24/using-ajax-to-data-bind-a-child-drop-down-list-based-on-the-selected-option-of-a-parent-select-control/" rel="bookmark">Using AJAX To Data Bind A Child Drop Down List Based On The Selected Option Of A Parent Select Control</a> (24)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>Some time ago I <a title="binding a data from database to dropdownlist based on selected item of another dropdown list" href="http://www.dougv.com/2011/10/10/binding-a-data-from-database-to-dropdownlist-based-on-selected-item-of-another-dropdown-list/">promised a formspring anon</a> I would do a tutorial on parent / child DropDownList controls in ASP.NET Web Forms. At long last, I&#8217;m delivering. (From here on out, I will use &#8220;DropDownList&#8221; and &#8220;select list&#8221; interchangeably.)</p>
<div class="aside">Parent-child <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.dropdownlist.aspx" target="_blank">DropDownList controls</a> means you have a parent, or main / master select list. Based on whatever selection is made in that first DropDownList, a second, &#8220;child&#8221; or &#8220;detail&#8221; select list is populated with relevant results.For example, if we had a database of cars, we might have a parent (master) DropDownList of manufacturers &#8212; Ford, Chevy, Toyota, etc. &#8212; and populate the child DropDownList with models from the selected manufacturer. So, if someone chose Ford in the parent select list, the child select list would automatically populate with choices such as Fusion, Mustang, Explorer, F-150, etc.</div>
<p>I&#8217;ll be demonstrating two different ways to accomplish this task, as well as a few variations on the first: First, binding with only <a href="http://msdn.microsoft.com/en-us/library/dz12d98w%28v=VS.100%29.aspx" target="_blank">SqlDataSource controls</a>, which is by far the easiest way to proceed and will suffice for about 90 percent of applications; second, using code behind and <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.comparevalidator.aspx" target="_blank">CompareValidator controls</a>, to cover all possible roadblocks.</p>
<p>Some notes before we proceed:</p>
<ul>
<li>I&#8217;ll use the <a title="Getting All ZIP Codes In A Given Radius From A Known Point / ZIP Code Via PHP And MySQL" href="http://www.dougv.com/2009/03/27/getting-all-zip-codes-in-a-given-radius-from-a-known-point-zip-code-via-php-and-mysql/" target="_blank">ZIP Code database</a> I&#8217;ve been using for a while as the back-end data. I also have a separate table of USPS state codes I&#8217;m using as the parent data, to help illustrate that you can use several tables / data sources to fuel this solution, provided the keys that relate the data make sense to each data store. In other words, you can use a lot of different sources for your data, so long as the data is <a href="http://computer.howstuffworks.com/question599.htm" target="_blank">relational</a>.</li>
<li>I&#8217;m going to use SQL Server, stored procedures and a connection string stored in my web.config file to access my data. I recognize that some people prefer to use SQL statements / LINQ and the like, or can only use Access / MySQL or other data stores. I really urge you to always use stored procedures, as they <a href="https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet#Defense_Option_1:_Prepared_Statements_.28Parameterized_Queries.29" target="_blank">are way safer than inline SQL statements</a>. As far as alternative data stores go, that should be a easy a fix as switching your code to use to the relevant <a href="http://msdn.microsoft.com/en-us/library/32c5dh3b%28v=VS.100%29.aspx" target="_blank">ADO.NET ODBC classes</a>, rather than the SQL Client classes.</li>
<li>This solution should work for ASP.NET versions 2.0 forward.</li>
</ul>
<p><span id="more-3950"></span><br />
<h3>Example 1: Using SqlDataSource Controls</h3>
<p>Most ASP.NET Web developers know about the SqlDataSource control and how to databind a DropDownList with that control. What they may not know is that, via the <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.controlparameter.aspx" target="_blank">ControlParameter class</a>, we can use the values in any other ASP.NET control(s) &#8212; including other databound controls &#8212; on the page as query parameters.</p>
<p>All you need to do is indicate, as properties of the ControlParameter, the ID of the control that will provide the key value for your child query, the property of that control (e.g., selected value, text, etc.) which should serve as the key, and the variable name that should be used in that query.</p>
<p>In our example, I have a select list named ddlParent, which will contain a list of state codes I get from a database table. Another select list, named ddlChild, will bind to a SqlDataSource control (named sqlChildDDL) that uses the selected value in ddlParent to retrieve proper records. </p>
<p>In my case, the stored procedure that will get the child records expects a parameter named &#8220;StateInitials&#8221;, the value of which comes from ddlParent and serves as the key for selecting the proper child records. By setting the <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listcontrol.autopostback.aspx" target="_blank">AutoPostBack property</a> of the parent DropDownList to true, I ensure the child DropDownList is rebound with the proper records each time the selected index of the parent list is changed.</p>
<pre class="brush: xml; title: ; notranslate">&lt;asp:Label runat=&quot;server&quot; ID=&quot;lblParent&quot; Text=&quot;Select A State: &quot; /&gt;
&lt;!-- parent ddl --&gt;
&lt;asp:DropDownList runat=&quot;server&quot; ID=&quot;ddlParent&quot; DataSourceID=&quot;sqlParentDDL&quot; DataValueField=&quot;StateCode&quot; DataTextField=&quot;StateName&quot; AutoPostBack=&quot;true&quot; /&gt;
&lt;!-- parent ddl is populated with a parameterless SQL query --&gt;
&lt;asp:SqlDataSource runat=&quot;server&quot; ID=&quot;sqlParentDDL&quot; SelectCommand=&quot;GetStates&quot; SelectCommandType=&quot;StoredProcedure&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:MyConnection %&gt;&quot; /&gt;
&lt;br /&gt;
&lt;!-- child ddl --&gt;
&lt;asp:Label runat=&quot;server&quot; ID=&quot;lblChild&quot; Text=&quot;Select A Town: &quot; /&gt;
&lt;asp:DropDownList runat=&quot;server&quot; ID=&quot;ddlChild&quot; DataSourceID=&quot;sqlChildDDL&quot; DataValueField=&quot;ZIPCode&quot; DataTextField=&quot;CityName&quot; /&gt;
&lt;!-- child ddl gets its parameter value from the selected value of the parent ddl --&gt;
&lt;!--
    ControlParamter property values
    ControlID: The ASP.NET control that is providing the paramter's value
    Name: The parameter's name as it appears in your stored procedure / SQL query
    PropertyName: The property of the ASP.NET control that will supply the value to your parameter
--&gt;
&lt;asp:SqlDataSource runat=&quot;server&quot; ID=&quot;sqlChildDDL&quot; SelectCommand=&quot;GetZIPCodes&quot; SelectCommandType=&quot;StoredProcedure&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:MyConnection %&gt;&quot;&gt;
    &lt;SelectParameters&gt;
        &lt;asp:ControlParameter ControlID=&quot;ddlParent&quot; Name=&quot;StateInitials&quot; PropertyName=&quot;SelectedValue&quot; /&gt;
    &lt;/SelectParameters&gt;
&lt;/asp:SqlDataSource&gt;</pre>
<p>Demo: <a href="http://dougv.net/demos/parent_child_dropdown/Example1A.aspx" target="_blank">http://dougv.net/demos/parent_child_dropdown/Example1A.aspx</a></p>
<div class="aside">Note that we can use any ASP.NET control on the page as a ControlParamter, and we can use any of that control&#8217;s properties as a parameter value, regardless of data type. </p>
<p>In other words, we could have a textbox on the page and use its Text property to let people type in free-text terms. (That&#8217;s a huge security risk, but it can be done.) </p>
<p>Or we could even use a static control with a non-text property, such as the <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.control.parent.aspx" target="_blank">Parent value of a Label control</a>. </p>
<p>Of course, we need to exercise care here; any parameter value we send to a database query has to be the right data type / something the database store understands how to parse. The point is, ControlParamter is a powerful tool; respect it and it will open a number of possibilities.</p></div>
<p>Now that we have a parent-child select lists pair, how do we use that data to power some other control&#8217;s data? Simple: We just use the <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listcontrol.selectedvalue.aspx" target="_blank">SelectedValue</a> of the child DropDownList as the ControlParamter value for another SqlDataSource &#8212; in this example, it will bind to a <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.aspx" target="_blank">GridView</a> that gives the selected town&#8217;s ZIP Code, CityLatitude and CityLongitude.</p>
<p>All we need to do is add the GridView and its SqlDataSource, plus set the AutoPostBack property for ddlChild to true, so that the GridView&#8217;s values will change any time ddlChild&#8217;s selected index is changed.</p>
<pre class="brush: xml; title: ; notranslate">&lt;asp:Label runat=&quot;server&quot; ID=&quot;lblParent&quot; Text=&quot;Select A State: &quot; /&gt;
&lt;!-- parent ddl --&gt;
&lt;asp:DropDownList runat=&quot;server&quot; ID=&quot;ddlParent&quot; DataSourceID=&quot;sqlParentDDL&quot; DataValueField=&quot;StateCode&quot; DataTextField=&quot;StateName&quot; AutoPostBack=&quot;true&quot; /&gt;
&lt;!-- parent ddl is populated with a parameterless SQL query --&gt;
&lt;asp:SqlDataSource runat=&quot;server&quot; ID=&quot;sqlParentDDL&quot; SelectCommand=&quot;GetStates&quot; SelectCommandType=&quot;StoredProcedure&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:MyConnection %&gt;&quot; /&gt;
&lt;br /&gt;
&lt;!-- child ddl --&gt;
&lt;asp:Label runat=&quot;server&quot; ID=&quot;lblChild&quot; Text=&quot;Select A Town: &quot; /&gt;
&lt;asp:DropDownList runat=&quot;server&quot; ID=&quot;ddlChild&quot; DataSourceID=&quot;sqlChildDDL&quot; DataValueField=&quot;ZIPCode&quot; DataTextField=&quot;CityName&quot; AutoPostBack=&quot;true&quot; /&gt;
&lt;!-- child ddl gets its parameter value from the selected value of the parent ddl --&gt;
&lt;!--
    ControlID: Name of the ASP.NET control that is providing the paramter's value
    Name: The name of the parameter in your stored procedure / SQL query
    PropertyName: The property of the control, specified in ControlID, that will supply the value to your query, specified in Name
--&gt;
&lt;asp:SqlDataSource runat=&quot;server&quot; ID=&quot;sqlChildDDL&quot; SelectCommand=&quot;GetZIPCodes&quot; SelectCommandType=&quot;StoredProcedure&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:MyConnection %&gt;&quot;&gt;
    &lt;SelectParameters&gt;
        &lt;asp:ControlParameter ControlID=&quot;ddlParent&quot; Name=&quot;StateInitials&quot; PropertyName=&quot;SelectedValue&quot; /&gt;
    &lt;/SelectParameters&gt;
&lt;/asp:SqlDataSource&gt;
&lt;br /&gt;
&lt;br /&gt;

&lt;!-- A GridView to show the resuls --&gt;
&lt;asp:GridView runat=&quot;server&quot; ID=&quot;gvDetails&quot; DataSourceID=&quot;sqlZipDetails&quot; DefaultMode=&quot;ReadOnly&quot; CellPadding=&quot;5&quot; AutoGenerateColumns=&quot;false&quot;&gt;
    &lt;AlternatingRowStyle BackColor=&quot;LightGray&quot; /&gt;
    &lt;HeaderStyle BackColor=&quot;LightYellow&quot; Font-Bold=&quot;True&quot; HorizontalAlign=&quot;Center&quot; /&gt;
    &lt;Columns&gt;
        &lt;asp:BoundField HeaderText=&quot;City&quot; DataField=&quot;CityName&quot; /&gt;
        &lt;asp:BoundField HeaderText=&quot;State&quot; DataField=&quot;StateInitials&quot; /&gt;
        &lt;asp:BoundField HeaderText=&quot;ZIP Code&quot; DataField=&quot;ZIPCode&quot; /&gt;
        &lt;asp:BoundField HeaderText=&quot;Latitide&quot; DataField=&quot;CityLatitude&quot; /&gt;
        &lt;asp:BoundField HeaderText=&quot;Longitude&quot; DataField=&quot;CityLongitude&quot; /&gt;
    &lt;/Columns&gt;
&lt;/asp:GridView&gt;
&lt;!-- the GridView gets records based on the SelectedValue of ddlChild --&gt;
&lt;asp:SqlDataSource runat=&quot;server&quot; ID=&quot;sqlZipDetails&quot; SelectCommand=&quot;GetCityDetails&quot; SelectCommandType=&quot;StoredProcedure&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:MyConnection %&gt;&quot;&gt;
    &lt;SelectParameters&gt;
        &lt;asp:ControlParameter ControlID=&quot;ddlChild&quot; Name=&quot;ZIPCode&quot; PropertyName=&quot;SelectedValue&quot; /&gt;
    &lt;/SelectParameters&gt;
&lt;/asp:SqlDataSource&gt;</pre>
<p>See this in action: <a href="http://dougv.net/demos/parent_child_dropdown/Default.aspx" target="_blank">http://dougv.net/demos/parent_child_dropdown/Default.aspx</a></p>
<h3>Example 1B: A Little Code Behind To Clean Things Up</h3>
<p>If you play with the demo above, you&#8217;ll notice a problem: Any time you change the selected <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listitem.aspx" target="_blank">ListItem</a> in ddlParent, the ListItems in ddlChild are updated, but not the data in the details GridView. </p>
<p>In other words, if you select a new state from the parent select list, the town values in the child select will change to the appropriate entries, but the GridView retains the old data from the previously selected town. Only choosing a new town from the child select list will update the GridView.</p>
<p>That happens because although ddlChild has been populated with new ListItems, the SelectedValue of ddlChild hasn&#8217;t been changed. Changing the SelectedValue is an act that must take place within ddlChild, not ddlParent. </p>
<p>In other words, the event that triggered the page to post back was a change in ddlParent&#8217;s selected value, <em>not</em> ddlChild. Until we explicitly instruct ddlChild to update its selected value, either programmatically or by hand, as far as ASP.NET is concerned, it retains the last SelectedValue, regardless of the fact that its ListItems have changed.</p>
<p>This behavior is by design and as it should be. But it does make for an annoyance we need to address.</p>
<p>Fortunately, we can fix this with just a little codebehind; namely, an event handler that fires on ddlParent&#8217;s OnSelectedIndexChanged event. That handler will:</p>
<ul>
<li>Rebind ddlChild to its SqlDataSource, which will now contain the correct town list.</li>
<li>Set the SelectedIndex of ddlChild to 0, or the first town in the new list.</li>
<li>Rebind the GridView&#8217;s SqlDataSource so it draws from the first town in the updated town list.</li>
</ul>
<pre class="brush: vb; title: ; notranslate">
Sub ddlParent_selectedIndexChanged(Sender As Object, E As EventArgs) Handles ddlParent.SelectedIndexChanged
	ddlChild.DataBind()
	ddlChild.SelectedIndex = 0
	sqlZipDetails.DataBind()
End Sub
</pre>
<p>Demo: <a href="http://dougv.net/demos/parent_child_dropdown/Example1B.aspx" target="_blank">http://dougv.net/demos/parent_child_dropdown/Example1B.aspx</a></p>
<p>This pretty much solves our data latency problem, but it adds duplicate queries to the process and thus is inefficient. We can do a better if we get more code-intensive.</p>
<h3>Example 2: Using Code Behind And CompareValidator Controls</h3>
<p>To streamline the process, reduce database queries and handle potentially bad inputs, we can use code behind to populate our DropDownLists and GridView, plus use CompareValidators to ensure we have legitimate data before sending our database queries.</p>
<p>We&#8217;ll bind records to a SqlDataReader, then use that reader to populate the DropDownLists and, where appropriate, the detail GridView. Additionally, we&#8217;ll use CompareValidators to ensure that the users have selected a valid option from each DropDownList. </p>
<p>First up, we need to create the DropDownLists and GridView. Notice that both DropDownLists begin with a single, default ListItem with a value of 0. </p>
<p>That&#8217;s because our valid options, once this list is populated, will never be zero; as a result, we can test with the CompareValidators whether the selected value of either DropDownList is 0. If it is, we know we have an invalid choice; otherwise, we expect the choice to be valid.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;asp:Label runat=&quot;server&quot; ID=&quot;lblParent&quot; Text=&quot;Select A State: &quot; /&gt;
&lt;asp:DropDownList runat=&quot;server&quot; ID=&quot;ddlParent&quot; AutoPostBack=&quot;true&quot;&gt;
    &lt;asp:ListItem Text=&quot;Select A State ...&quot; Value=&quot;0&quot; /&gt;
&lt;/asp:DropDownList&gt;
&lt;asp:CompareValidator runat=&quot;server&quot; ID=&quot;cvParent&quot; ControlToValidate=&quot;ddlParent&quot; ValueToCompare=&quot;0&quot; Operator=&quot;NotEqual&quot; ErrorMessage=&quot;Please select a valid option&quot; Display=&quot;Dynamic&quot; /&gt;
&lt;br /&gt;
&lt;asp:Label runat=&quot;server&quot; ID=&quot;lblChild&quot; Text=&quot;Select A Town: &quot; /&gt;
&lt;asp:DropDownList runat=&quot;server&quot; ID=&quot;ddlChild&quot; AutoPostBack=&quot;true&quot;&gt;
    &lt;asp:ListItem Text=&quot;Select A State First&quot; Value=&quot;0&quot; /&gt;
&lt;/asp:DropDownList&gt;
&lt;asp:CompareValidator runat=&quot;server&quot; ID=&quot;cvChild&quot; ControlToValidate=&quot;ddlChild&quot; ValueToCompare=&quot;0&quot; Operator=&quot;NotEqual&quot; ErrorMessage=&quot;Please select a valid option&quot; Display=&quot;Dynamic&quot; /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;asp:GridView runat=&quot;server&quot; ID=&quot;gvDetails&quot; CellPadding=&quot;5&quot; AutoGenerateColumns=&quot;false&quot;&gt;
    &lt;AlternatingRowStyle BackColor=&quot;LightGray&quot; /&gt;
    &lt;HeaderStyle BackColor=&quot;LightYellow&quot; Font-Bold=&quot;True&quot; HorizontalAlign=&quot;Center&quot; /&gt;
    &lt;Columns&gt;
        &lt;asp:BoundField HeaderText=&quot;City&quot; DataField=&quot;CityName&quot; /&gt;
        &lt;asp:BoundField HeaderText=&quot;State&quot; DataField=&quot;StateInitials&quot; /&gt;
        &lt;asp:BoundField HeaderText=&quot;ZIP Code&quot; DataField=&quot;ZIPCode&quot; /&gt;
        &lt;asp:BoundField HeaderText=&quot;Latitide&quot; DataField=&quot;CityLatitude&quot; /&gt;
        &lt;asp:BoundField HeaderText=&quot;Longitude&quot; DataField=&quot;CityLongitude&quot; /&gt;
    &lt;/Columns&gt;
&lt;/asp:GridView&gt;
</pre>
<p>We have several subroutines needed to power this solution. </p>
<p>First, we need to initially populate the parent DropDownList; we&#8217;ll do that in the Page_Load subroutine, checking whether this page is a postback. (We don&#8217;t want to repopulate the parent select list on every page refresh; if we do, we won&#8217;t ever be able to change the child select list&#8217;s values, since the selected index of the parent DropDownList becomes 0, automatically, every time it is databound.</p>
<pre class="brush: vb; title: ; notranslate">
Sub Page_Load(Sender As Object, E As EventArgs) Handles Me.Load
	If Not Page.IsPostBack Then
		ddlParent_dataBind()
	End If
End Sub
</pre>
<p>The process of binding the parent DropDownList is just connecting to the database server, populating a SqlDataReader with records, binding that to the parent DropDownList and indicating which fields should be used for text and values of the resulting ListItems.</p>
<pre class="brush: vb; title: ; notranslate">
Sub ddlParent_dataBind()
	Dim objConn As New SqlConnection(ConfigurationManager.ConnectionStrings(&quot;MyConnection&quot;).ConnectionString)
	Dim objCmd As New SqlCommand(&quot;GetStates&quot;, objConn)
	objCmd.CommandType = CommandType.StoredProcedure

	Dim objReader As SqlDataReader

	objConn.Open()
	objReader = objCmd.ExecuteReader()

	If Not objReader.HasRows Then
		ddlParent.Items.Clear()
		ddlParent.Items.Add(&quot;No records found.&quot;)
		ddlParent.Enabled = False
	Else
		ddlChild.Enabled = True
		ddlParent.DataSource = objReader
		ddlParent.DataTextField = &quot;StateName&quot;
		ddlParent.DataValueField = &quot;StateCode&quot;
		ddlParent.DataBind()
		ddlParent.Items.Insert(0, New ListItem(&quot;Select A State ...&quot;, &quot;0&quot;))
	End If

	objConn.Close()
	objCmd.Dispose()
	objConn.Dispose()
End Sub
</pre>
<p>We bind data to the child select list in a similar way, except we&#8217;re going to get some sort of key value from the parent DropDownList. So we pass that in as a parameter.</p>
<pre class="brush: vb; title: ; notranslate">
Sub ddlChild_dataBind(strKey As String)
	ddlChild.Items.Clear()

	Dim objConn As New SqlConnection(ConfigurationManager.ConnectionStrings(&quot;MyConnection&quot;).ConnectionString)
	Dim objCmd As New SqlCommand(&quot;GetZIPCodes&quot;, objConn)
	objCmd.CommandType = CommandType.StoredProcedure

	objCmd.Parameters.Add(New SqlParameter(&quot;StateInitials&quot;, SqlDbType.Char, 2))
	objCmd.Parameters(&quot;StateInitials&quot;).Value = strKey

	Dim objReader As SqlDataReader

	objConn.Open()
	objReader = objCmd.ExecuteReader()

	If Not objReader.HasRows Then
		ddlChild.Items.Clear()
		ddlChild.Items.Insert(0, &quot;Error getting towns list from database&quot;)
	Else
		ddlChild.Enabled = True
		ddlChild.DataSource = objReader
		ddlChild.DataTextField = &quot;CityName&quot;
		ddlChild.DataValueField = &quot;ZIPCode&quot;
		ddlChild.DataBind()
		ddlChild.Items.Insert(0, New ListItem(&quot;Select A Town ...&quot;, &quot;0&quot;))
	End If

	objConn.Close()
	objCmd.Dispose()
	objConn.Dispose()
End Sub
</pre>
<p>And binding the GridView data is pretty much more of the same.</p>
<pre class="brush: vb; title: ; notranslate">
Sub gvDetails_dataBind(strKey As String)
	Dim objConn As New SqlConnection(ConfigurationManager.ConnectionStrings(&quot;MyConnection&quot;).ConnectionString)
	Dim objCmd As New SqlCommand(&quot;GetCityDetails&quot;, objConn)
	objCmd.CommandType = CommandType.StoredProcedure

	objCmd.Parameters.Add(New SqlParameter(&quot;ZIPCode&quot;, SqlDbType.Char, 5))
	objCmd.Parameters(&quot;ZIPCode&quot;).Value = strKey

	Dim objReader As SqlDataReader

	objConn.Open()
	objReader = objCmd.ExecuteReader()

	gvDetails.DataSource = objReader
	gvDetails.DataBind()

	objConn.Close()
	objCmd.Dispose()
	objConn.Dispose()
End Sub
</pre>
<p>Note that in all this databinding, I am not checking for exceptions, such as failure to connect to the database, a problem with the stored procedures, etc. </p>
<p>As I have said before, what makes for workable error trapping on your end is impossible for me to know, which is why I am not including it here. <em>You should always check for errors.</em> Don&#8217;t trust your programs won&#8217;t break; expect them to break. How you do that is up to you, but you definitely should prepare for failure.</p>
<p>We&#8217;ve got one more non-event subroutine to consider before we get into the action: A way to reset the GridView when we don&#8217;t have a valid child DropDownList selection. </p>
<p>To do that, we&#8217;ll simply set the DataSource of the GridView to nothing (null), then bind it; when a GridView is bound to a null, it is thus empty and, absent having its EmptyDataTemplate or EmptyDataText properties set, simply doesn&#8217;t render.</p>
<p>(I recognize that using nulls in this way is lazy. An alternative is to toggle the visibility of the GridView so that it only shows when we know we have good data, but that&#8217;s wordier and yes, I am being kind of lazy here.)</p>
<pre class="brush: vb; title: ; notranslate">
Sub gvDetails_reset()
	gvDetails.DataSource = Nothing
	gvDetails.DataBind()
End Sub
</pre>
<p>OK, with the mechanical parts of our code out of the way, we can handle changes to the selected item indexes of both the parent and child lists.</p>
<p>In the case of a parent select list change, we always know that whatever information is currently in the detail GridView will be outdated. So we&#8217;ll reset it, and we&#8217;ll rebind the child DropDownList if the selection in the parent DropDownList is valid (which we check with the relevant CompareValidator).</p>
<pre class="brush: vb; title: ; notranslate">
Sub ddlParent_selectedIndexChanged(Sender As Object, E As EventArgs) Handles ddlParent.SelectedIndexChanged
	cvParent.Validate()
	If cvParent.IsValid Then
		ddlChild_dataBind(ddlParent.SelectedValue)
		ddlChild.SelectedIndex = 0
	End If
	gvDetails_reset()
End Sub
</pre>
<p>When the child DropDownList&#8217;s selected index is changed, one of two things are true: Either the selection isn&#8217;t valid, in which case we reset the detail GridView, or it&#8217;s time to populate the details GridView with a new town&#8217;s information.</p>
<pre class="brush: vb; title: ; notranslate">
Sub ddlChild_selectedIndexChanged(Sender As Object, E As EventArgs) Handles ddlChild.SelectedIndexChanged
	cvChild.Validate()
	If cvChild.IsValid Then
		gvDetails_dataBind(ddlChild.SelectedValue)
	Else
		gvDetails_reset()
	End If
End Sub
</pre>
<p>You can see all this in action here: <a href="http://dougv.net/demos/parent_child_dropdown/Example2.aspx" target="_blank">http://dougv.net/demos/parent_child_dropdown/Example2.aspx</a>. You can also copy and paste relevant code from there. I distribute code under the GNU GPL version 3.</p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2009/06/21/parent-child-select-lists-revisited-multiple-parent-child-select-lists-via-php-mysql-and-jquery/" rel="bookmark">Parent &#8211; Child Select Lists Revisited: Multiple Parent &#8211; Child Select Lists Via PHP, MySQL And jQuery</a> (28.7)</li>
				<li><a href="https://www.dougv.com/2011/04/24/automatically-hash-tagging-text-with-asp-net-web-forms-vb-net/" rel="bookmark">Automatically Hash Tagging Text With ASP.NET Web Forms (VB.NET)</a> (25)</li>
				<li><a href="https://www.dougv.com/2009/04/24/using-ajax-to-data-bind-a-child-drop-down-list-based-on-the-selected-option-of-a-parent-select-control/" rel="bookmark">Using AJAX To Data Bind A Child Drop Down List Based On The Selected Option Of A Parent Select Control</a> (24)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/drop-down-select-list/" title="drop down / select list" rel="tag">drop down / select list</a>, <a href="https://www.dougv.com/tag/microsoft/" title="Microsoft" rel="tag">Microsoft</a>, <a href="https://www.dougv.com/tag/msdn/" title="MSDN" rel="tag">MSDN</a>, <a href="https://www.dougv.com/tag/zip-code-database/" title="ZIP Code database" rel="tag">ZIP Code database</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2011/12/25/parent-child-dropdownlist-controls-in-asp-net-web-forms-vb-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New England GiveCamp 2011: What A Weekend!</title>
		<link>https://www.dougv.com/2011/05/03/new-england-givecamp-2011-what-a-weekend/</link>
		<comments>https://www.dougv.com/2011/05/03/new-england-givecamp-2011-what-a-weekend/#comments</comments>
		<pubDate>Tue, 03 May 2011 22:40:04 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Transact-SQL]]></category>
		<category><![CDATA[crowdsourcing]]></category>
		<category><![CDATA[ethics]]></category>
		<category><![CDATA[GiveCamp]]></category>
		<category><![CDATA[GoDaddy]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[graphic design]]></category>
		<category><![CDATA[Jim O'Neil]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.dougv.com/?p=3849</guid>
		<description><![CDATA[New England GiveCamp 2011 was a great experience! Here's how the weekend went for my team.<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/06/10/at-new-england-givecamp-this-weekend/" rel="bookmark">At New England GiveCamp This Weekend</a> (30.9)</li>
				<li><a href="https://www.dougv.com/2010/06/16/new-england-givecamp-2010-what-a-great-experience/" rel="bookmark">New England GiveCamp 2010: What A Great Experience</a> (21.7)</li>
				<li><a href="https://www.dougv.com/2010/05/13/designers-and-developers-donate-your-time-talent-at-new-england-give-camp-june-11-13-2010/" rel="bookmark">Designers And Developers: Donate Your Time, Talent At New England GiveCamp, June 11-13, 2010</a> (21.1)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>Last weekend was <a href="http://newenglandgivecamp.org/" target="_blank">New England GiveCamp</a> <a href="http://newenglandgivecamp.org/category/give-camp-2011/" target="_blank">2011</a>, in which 100+ developers, designers and other volunteers gathered to donate time and skills to some 30 charities who needed IT help.</p>
<p>This year, I was project lead for <a href="http://www.alexsteamfoundation.com/" target="_blank"><strong>Alex&#8217;s Team Foundation</strong></a>, based in Andover, Mass. Our team was <a href="https://twitter.com/#!/saush11" target="_blank"><strong>Saurabh Moondhra</strong></a> and <a href="http://dirigosoftwaresolutions.com" target="_blank"><strong>William Wade</strong></a>, both experienced ASP.NET developers.</p>
<p>Alex&#8217;s Team Foundation, named after 16-year-old Alex Miliotis, who passed away from leukemia in 2002, raises money to support nurses and other oncology professionals, and supports youth sports. The foundation is largely the labors of <strong>Patti Rae Miliotis</strong>, Alex&#8217;s mother, and a handful of reliable volunteers. Like every small nonprofit, Alex&#8217;s Team doesn&#8217;t have a lot of money.</p>
<div id="attachment_3853" class="wp-caption alignnone" style="width: 710px"><img class="size-full wp-image-3853" title="Alex's Team Foundation at New England GiveCamp 2011" src="http://www.dougv.com/wp-content/uploads/2011/05/negc2011_08.png" alt="Alex's Team Foundation at New England GiveCamp 2011" width="700" height="245" /><p class="wp-caption-text">From the right to left: William Wade, Doug Vanderweide, Saurabh Moondhra and Patti Rae Miliotis of Alex&#39;s Team Foundation. The lady with her feet up is Deanna Lohnes, who worked on another project; the woman in green, whose name I do not know, was her charity&#39;s contact person.</p></div>
<p>Like every other leader of a small nonprofit, Patti is pulled in a lot of different directions and has all she can do to keep track of the people with whom she comes in contact, nonetheless all the donations she gets. Patti also hosts a few events every year. She basically needs a way to keep track of who attends those events or otherwise supports her organization, and to mail merge thank-you notes.</p>
<p>So that was the project I led this weekend: Converting a bunch of data stored in (of course!) Excel spreadsheets into a more relational database, with the ability to export that data in order to mail merge thank-you and fundraising letters.</p>
<p><span id="more-3849"></span></p>
<h3>CiviCRM: Too Much, Too Late</h3>
<p>At first, I thought we could use <a href="http://civicrm.org/" target="_blank">CiviCRM</a>, which is a Joomla / Drupal extension to manage membership, events, capital campaigns, email lists and the like.</p>
<p>The primary benefit in it, to my thinking, was that it does most of what Patti needed done; so, if she could use it, most of the work would already be done. That would allow us not only to import her spreadsheets, but also pay some attention to re-skinning the foundation&#8217;s current Web site (which is sorely needed).</p>
<p>CiviCRM&#8217;s biggest drawback is a huge learning curve. It is not easy to understand out of the box, especially if someone doesn&#8217;t have prior experience with customer relation management software. That was Patti&#8217;s problem: It was too daunting, much like the system she had tried previously.</p>
<p>So our task played directly to our strengths: Make an easy-to-use contact database on the Web, which could also track donations and event registrations.</p>
<h3>Friday: Three Ways To Skin A Cat</h3>
<p>Patti asked that we use Access to make her database, since she has some experience with it. Unfortunately, nobody on our team knew much about Access, and at least two of us have had negative experiences with it.</p>
<p>At last year&#8217;s GiveCamp, William wound up having to become an on-the-spot Access developer, and it left something of a sour taste. I&#8217;ve never had much success building standalone Access databases, largely because I find its visual query and form designers extremely limiting. Saurabh said he had little to no experience with Access.</p>
<p>The one thing we all knew was <a href="http://www.asp.net/web-forms" target="_blank">ASP.NET Web Forms</a>. Well, to be specific, we knew three different versions of ASP.NET Web Forms. Saurabh programs in C#. William and I prefer VB.NET. William likes using <a href="http://msdn.microsoft.com/en-us/netframework/aa904594" target="_blank">Linq</a>; I prefer old-school stored procedures; Saurabh likes inline SQL statements.</p>
<p>The good thing in that is, an ASP.NET Web application doesn&#8217;t need to run under just one language, and so long as the connections and queries are good, you can mix and match database layers to your hearts&#8217; content.</p>
<p>So we settled in to design a database schema that could record contacts, donations and events. That consumed most of Friday night&#8217;s efforts. Here&#8217;s how it looked on the whiteboard. <em>(Saurabh took this with his cell phone camera. Click it for full-size, which is easier to read.)</em></p>
<p><a href="http://www.dougv.com/wp-content/uploads/2011/05/Photo_CB6DA206-0E0E-C34E-DADC-2CD1B7D8C086.jpg"><img class="alignnone size-large wp-image-3858" title="Our database schema" src="http://www.dougv.com/wp-content/uploads/2011/05/Photo_CB6DA206-0E0E-C34E-DADC-2CD1B7D8C086-728x545.jpg" alt="Our database schema" width="728" height="545" /></a></p>
<h3>Saturday: Tackling The Obstacles</h3>
<p>Saturday started with a lot of little hiccups.</p>
<p><a href="http://discountasp.net/" target="_blank">DiscountASP.NET</a> very kindly donated the Web hosting for our application. However, they require a domain name in order to host a site, and wouldn&#8217;t donate that. Because we weren&#8217;t redesigning the Alex&#8217;s Team site, which needed to remain on its current server, we couldn&#8217;t use the one domain name Patti had. So I popped on over to GoDaddy and bought a special domain for the occasion.</p>
<p>With a domain in hand, we could go ahead and create our application. Except that DiscountASP.NET, which would also donate a SQL Server database, has a separate ordering process for add-on services, which meant we would be delayed for several hours while we waited for the database to be set up.</p>
<p>Since our entire application was basically just a GUI to a relational database, we really couldn&#8217;t get much done without a database. So I tried to use one of my free GoDaddy Web hosting credits to set up service sufficient to get us started.</p>
<p>Unfortunately, I couldn&#8217;t use the newly registered domain to access any free service, because I guess the registration was too new; also, all the other domains I have registered through GoDaddy point to something, so I couldn&#8217;t use one of those.</p>
<p>Thankfully, GoDaddy will sell Web hosting for $8 for one month without need for a contract, so I just went ahead with that; and within 30 minutes, we were able to build our database and start making forms.</p>
<div class="aside">For the record, DiscountASP.NET came through for us completely by early Saturday afternoon. It was only my panic, lack of timely preparation / organization and impatience that made me use GoDaddy. This application will soon be moved to DiscountASP.NET, where it will permanently reside. I&#8217;ve used DiscountASP.NET for Web hosting in the past and in terms of features and reliability, they simply cannot be outdone.</div>
<ul>
<li>I didn&#8217;t pre-install Visual Studio on my crappy laptop; that took two hours out of Saturday morning. A new laptop will definitely be in the offing for next year.</li>
<li>While waiting for that install to finish, I went on a wild goose chase for a convenience store in Cambridge. Suffice it to say, the one nearest to NERD is a 7-Eleven about a half-mile away; but I wound up hanging around for about 45 minutes outside <a href="http://store.thecoop.com/" target="_blank">the Coop</a>, waiting for it to open, because I was mistakenly led to believe it sold tobacco. (I fell off the no-smoking wagon for the weekend; I knew there would be some stress, and nicotine definitely keeps me calm.) So what should have been a 20-minute break turned in to an hour and a half.</li>
</ul>
<div id="attachment_3862" class="wp-caption alignnone" style="width: 717px"><img class="size-full wp-image-3862" title="Saurabh accuses me of being high. It's not an unreasonable assumption." src="http://www.dougv.com/wp-content/uploads/2011/05/tweet01.jpg" alt="Saurabh accuses me of being high. It's not an unreasonable assumption." width="707" height="378" /><p class="wp-caption-text">I was gone so long in search of smokes, Saurabh accused me of going to get stoned. It was a reasonably accurate portrayal.</p></div>
<ul>
<li>Somewhere around 1 pm, I mistakenly thought we would have to work in ASP.NET 2.0 in order to resolve some namespace and other issues, and I communicated as much to my team. This led them to delete what they had made to that point. Within 5 minutes, William had corrected my error. Saurabh was nonplussed.</li>
<li>After dinner, we were ready to start integrating our files. Non unexpectedly, we ran into a number of small issues. It took a little while to get William&#8217;s files working on my laptop, but try as we might, we just couldn&#8217;t get Saurabh&#8217;s C#-based solution to work. So he wound up converting them to VB.NET. I went back to the hotel to finish my part of the solution.</li>
</ul>
<p>On Saturday night, I gave a quick overview on WordPress for the non-profits that I fear was a real snoozer. (Memo to self: Never host a seminar after dinner.) During that, I won my choice of a number of software prizes; but what was left available in the first-come, first-served prize pool didn&#8217;t really thrill me.</p>
<p>William had his eye on a copy of <a href="http://www.devexpress.com/Subscriptions/DXperience/editionEnt.xml" target="_blank">DevExpress DXPerience Enterprise</a>, a bunch of .NET controls, worth about $1,300 on the retail market. I seldom program in Windows and he does all the time, so I transferred my winnings to him.</p>
<h3>A Word About The Royal Sonesta</h3>
<p>While many GiveCampers &#8212; William and Saurabh among them &#8212; spent the night at NERD, I stayed at a hotel, because I&#8217;m too old and fussy to be sleeping on hard floors. Also, I&#8217;m in Cambridge, which is quite a treat for me, and I wanted a chance to spend at least a little time in the city each night, even if it was just walking a half-mile to the hotel and having a drink or two in the lounge. So I opted to stay at the <a href="http://www.sonesta.com/boston/" target="_blank">Royal Sonesta</a>, which had the best rates.</p>
<p><iframe src="http://maps.google.com/maps/ms?hl=&amp;ie=UTF8&amp;msa=0&amp;msid=208401827101352337890.0004a2659aa672a475969&amp;ll=42.364727,-71.085362&amp;spn=0.011098,0.031242&amp;z=15&amp;output=embed" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="728" height="350"></iframe><br />
<small>View <a style="color: #0000ff; text-align: left;" href="http://maps.google.com/maps/ms?hl=&amp;ie=UTF8&amp;msa=0&amp;msid=208401827101352337890.0004a2659aa672a475969&amp;ll=42.364727,-71.085362&amp;spn=0.011098,0.031242&amp;z=15&amp;source=embed">New England GiveCamp 2011</a> in a larger map</small></p>
<p>This simple plot was foiled, however, by the Royal Sonesta&#8217;s unfathomable renting out of the first-floor lounge on both Friday and Saturday night. On Friday, I was able to get a single beer, but it felt very strange crashing a private event and I wound up calling it a night early. On Saturday, they just turned me away, period, because a wedding reception was being held there.</p>
<p>Also, while the Sonesta loudly advertised its local shuttle service, they require you to register for it; and nobody saw fit to remind me of it at the concierge desk, when I asked for a shuttle schedule. As a result, I stood outside for a half-hour on Friday night, waiting for a shuttle that never showed up.</p>
<p>Overall, the Sonesta&#8217;s staff was courteous and friendly; especially the front desk, porters and valets. But the concierges were inexplicably surly, brusque, unapologetic and unhelpful.</p>
<p>So while the price was great ($144 per night, amazingly good for Cambridge), the hotel was clean and the room / amenities nice, I cannot recommend the place. I mean, what kind of hotel closes its lounge to guests? And has concierge service that basically looks to do as little as possible, and that with a frown on its face?</p>
<h3>Sunday: It All Comes Together, Like Magic</h3>
<p>The great benefit of having competent, skilled and motivated team members is that their sense of urgency and their ability to adapt and overcome adversity are both fine-tuned. That was certainly the case with William and Saurabh; they were pretty much done by Sunday morning, and all we had to do was take one more crack at getting all three parts to play nicely with one another.</p>
<p>I let that task fall to William, and he did an extraordinary job getting everything to work; certainly, a much better job than I would have done. Meanwhile, Saurabh settled in to help Patti make some upgrades to her Web site, notably in getting her Paypal donation button working again, adding in some alternative donation options and adding Google Analytics to her site.</p>
<p>Saurabh also won an instant drawing on Sunday and scored a copy of Age of Empires III for PC. I had my heart set on winning a WiFi-enabled Kindle, which was being given away at the end of GiveCamp; but that didn&#8217;t happen.</p>
<p>Not to say we didn&#8217;t get some great swag:</p>
<ul>
<li>A full-boat copy of Microsoft Office 2010 Professional. Awesome!</li>
<li>A thumb drive. You can never have too many of those.</li>
<li>A set of jewelers&#8217; screwdrivers. Again, you can never have too many of them.</li>
<li>A screw-top sippy cup with durable straw. Which is exactly what my spill-prone self needs to have on his work desk.</li>
<li>A miniature Nerf football. Awesome stress reliever.</li>
<li>A pen and pad of paper. Again, never can have enough of either.</li>
<li>A puzzle book. Not that I had time during the weekend to mess with puzzles.</li>
<li>A GiveCamp T-shirt. I like T-shirts as mementos.</li>
</ul>
<p>During the weekend, Jim O&#8217;Neil dropped scores of additional treats on a giveaway table, many of which were O&#8217;Reilly books. I managed to get a spare puzzle book, several notepads, a <a href="http://www.amazon.com/Oracle-Language-Pocket-Reference-OReilly/dp/0596514042/" target="_blank">PL/SQL quick pocket reference</a>, <a href="http://www.amazon.com/Access-2010-Missing-Matthew-MacDonald/dp/1449382371/" target="_blank">Access 2010: the missing manual</a> and <a href="http://www.amazon.com/Microsoft®-Visual-Basic®-2010-Microsoft/dp/0735626693/" target="_blank">Visual Basic 2010 Step By Step</a>. There were a number of other books available but I was too slow to score them. However, I understand I am allowed a free ebook from O&#8217;Reilly, as well.</p>
<p>The bottom line is that we got our project done, it works, Patti seems fairly pleased with it and we had a great time this weekend. It&#8217;s definitely renewed my commitment; I&#8217;ll be a GiveCamper until I can&#8217;t do it any more.</p>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/new-england-givecamp-2011-what-a-weekend" target="_blank">http://www.delicious.com/dougvdotcom/new-england-givecamp-2011-what-a-weekend</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/06/10/at-new-england-givecamp-this-weekend/" rel="bookmark">At New England GiveCamp This Weekend</a> (30.9)</li>
				<li><a href="https://www.dougv.com/2010/06/16/new-england-givecamp-2010-what-a-great-experience/" rel="bookmark">New England GiveCamp 2010: What A Great Experience</a> (21.7)</li>
				<li><a href="https://www.dougv.com/2010/05/13/designers-and-developers-donate-your-time-talent-at-new-england-give-camp-june-11-13-2010/" rel="bookmark">Designers And Developers: Donate Your Time, Talent At New England GiveCamp, June 11-13, 2010</a> (21.1)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/crowdsourcing/" title="crowdsourcing" rel="tag">crowdsourcing</a>, <a href="https://www.dougv.com/tag/ethics/" title="ethics" rel="tag">ethics</a>, <a href="https://www.dougv.com/tag/givecamp/" title="GiveCamp" rel="tag">GiveCamp</a>, <a href="https://www.dougv.com/tag/godaddy/" title="GoDaddy" rel="tag">GoDaddy</a>, <a href="https://www.dougv.com/tag/google/" title="Google" rel="tag">Google</a>, <a href="https://www.dougv.com/tag/graphic-design/" title="graphic design" rel="tag">graphic design</a>, <a href="https://www.dougv.com/tag/jim-oneil/" title="Jim O&#039;Neil" rel="tag">Jim O&#039;Neil</a>, <a href="https://www.dougv.com/tag/marketing/" title="marketing" rel="tag">marketing</a>, <a href="https://www.dougv.com/tag/msdn/" title="MSDN" rel="tag">MSDN</a>, <a href="https://www.dougv.com/tag/visual-studio/" title="Visual Studio" rel="tag">Visual Studio</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2011/05/03/new-england-givecamp-2011-what-a-weekend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>De-Spamming My Twitter Followers</title>
		<link>https://www.dougv.com/2011/03/16/de-spamming-my-twitter-followers/</link>
		<comments>https://www.dougv.com/2011/03/16/de-spamming-my-twitter-followers/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 17:09:26 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[reputation]]></category>

		<guid isPermaLink="false">http://www.dougv.com/?p=3764</guid>
		<description><![CDATA[I don't have many rules about Twitter, but those I have need to be enforced with a general purge of bad followers.<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/11/29/follow-me-on-twitter-dougvdotcom/" rel="bookmark">Follow Me On Twitter @dougvdotcom</a> (17.2)</li>
				<li><a href="https://www.dougv.com/2011/01/03/update-to-the-yourls-twitter-google-reader-script/" rel="bookmark">Update To The YOURLS &#8211; Twitter &#8211; Google Reader Script</a> (14.7)</li>
				<li><a href="https://www.dougv.com/2010/10/28/how-jim-rome-uses-social-media-to-control-the-worst-of-his-audience/" rel="bookmark">How Jim Rome Uses Social Media To Control The Worst Of His Audience</a> (5)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently <a href="https://twitter.com/#!/dougvdotcom/status/48008943657689089" target="_blank">despammed my Twitter follower list</a>. If you were following me, and now find yourself blocked, you have my apologies. <a title="About Me / Contact Me" href="http://www.dougv.com/about-me/" target="_blank">Please send me an e-mail</a> and I&#8217;ll unblock you.</p>
<p><a href="http://www.twitter.com/#!/dougvdotcom"><img class="size-full wp-image-3767 alignright" title="Follow me @dougvdotcom" src="http://www.dougv.com/wp-content/uploads/2011/03/300.pantyhose.lr_.110609.jpg" alt="Follow me @dougvdotcom" width="300" height="300" /></a>This provides me with a great opportunity to discuss my attitude about Twitter followers and following.</p>
<p>Generally speaking, if someone starts following me, I follow them. If I follow someone, I usually expect to be followed back, and likely will stop following, after a week or so, someone who isn&#8217;t following me.</p>
<p>Exceptions to this rule are announcement accounts (e.g, <a href="https://twitter.com/#!/MSDN" target="_blank">@MSDN</a>, <a href="https://twitter.com/#!/GoogleCode" target="_blank">@GoogleCode</a>, <a href="https://twitter.com/#!/APStylebook" target="_blank">@APStylebook</a>) and major celebrities (guideline: someone whose identity has been verified by Twitter, e.g. <a href="https://twitter.com/#!/SethMacFarlane" target="_blank">@SethMacFarlane</a>).</p>
<p>I may decide not to follow someone, but that doesn&#8217;t mean I mind them following me. I prefer a two-way street, but that&#8217;s not to say that people who only want to listen aren&#8217;t welcome to follow me.</p>
<p>I do mind being followed by Twitter accounts that are:</p>
<ul>
<li>Obviously meant only to spam. If all a follower does on Twitter is solicit business, please keep me out of it.</li>
<li>Astroturfing. This one is sometimes a judgment call, but if a follower&#8217;s tweets are about things other than the kinds of things I am talking about (or the follower hasn&#8217;t  tweeted at all), and that tweeter is following a lot of other people with whom he is not communicating / has no common interests, I&#8217;ll probably toss him into this category and block him.</li>
<li>Patently offensive. Profanity, sexually suggestive comments, edgy humor; these are all fine. Trolling and hating are not.</li>
<li>Malicious bots. I am followed by a handful of IT bots; so long as they&#8217;re reposting / harvesting relevant info, I&#8217;m OK with that. All other bots can GTFO.</li>
</ul>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/11/29/follow-me-on-twitter-dougvdotcom/" rel="bookmark">Follow Me On Twitter @dougvdotcom</a> (17.2)</li>
				<li><a href="https://www.dougv.com/2011/01/03/update-to-the-yourls-twitter-google-reader-script/" rel="bookmark">Update To The YOURLS &#8211; Twitter &#8211; Google Reader Script</a> (14.7)</li>
				<li><a href="https://www.dougv.com/2010/10/28/how-jim-rome-uses-social-media-to-control-the-worst-of-his-audience/" rel="bookmark">How Jim Rome Uses Social Media To Control The Worst Of His Audience</a> (5)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/google/" title="Google" rel="tag">Google</a>, <a href="https://www.dougv.com/tag/msdn/" title="MSDN" rel="tag">MSDN</a>, <a href="https://www.dougv.com/tag/reputation/" title="reputation" rel="tag">reputation</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2011/03/16/de-spamming-my-twitter-followers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating An ASP.NET RSS Feed, Using Data From SQL Server And HTTP WebHandler</title>
		<link>https://www.dougv.com/2010/12/11/creating-an-asp-net-rss-feed-using-data-from-sql-server-and-http-webhandler/</link>
		<comments>https://www.dougv.com/2010/12/11/creating-an-asp-net-rss-feed-using-data-from-sql-server-and-http-webhandler/#comments</comments>
		<pubDate>Sat, 11 Dec 2010 06:14:35 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Transact-SQL]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Google Reader]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3463</guid>
		<description><![CDATA[There are a couple of ways to create an RSS feed from a SQL database store. Over at 4GuysFromRolla.com, there&#8217;s a post explaining how to create an RSS feed using a regular old ASP.NET Web Form. Another option would be to write a script that creates an actual XML file on some periodic basis (probably [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2008/08/21/displaying-an-image-stored-in-a-sql-server-database-on-an-aspnet-page-using-vbnet/" rel="bookmark">Displaying An Image Stored In A SQL Server Database On An ASP.NET Page Using VB.NET</a> (30.4)</li>
				<li><a href="https://www.dougv.com/2010/10/04/backing-up-your-sql-server-database-to-sql-files-with-management-studio-express/" rel="bookmark">Backing Up Your SQL Server Database To SQL Files With Management Studio Express</a> (28.8)</li>
				<li><a href="https://www.dougv.com/2010/03/29/rss-feeds-now-show-full-entries/" rel="bookmark">RSS Feeds Now Show Full Entries</a> (19.7)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>There are a couple of ways to create an RSS feed from a SQL database store. Over at 4GuysFromRolla.com, there&#8217;s a post explaining how to create an RSS feed <a href="http://www.4guysfromrolla.com/articles/021804-1.aspx" target="_blank">using a regular old ASP.NET Web Form</a>.</p>
<p>Another option would be to write a script that creates an actual XML file on some periodic basis (probably just before the recommended &#8220;time to live&#8221; setting of the feed). The benefit of that is, one taxes the database server a little every now and then, and a &#8220;real&#8221; XML file does the work.</p>
<p>But as a rule, for ASP.NET applications, <a href="http://msdn.microsoft.com/en-us/library/bb398986.aspx" target="_blank">Microsoft recommends using HTTP handlers or modules</a> whenever one wants to present data other than HTML.</p>
<div class="aside">A <em>handler </em>is a special ASP.NET Web page; a <em>module </em>is a plug-in one can install in <a href="http://msdn.microsoft.com/en-us/library/bb757040.aspx" target="_blank">Internet Information Server</a>. If you&#8217;ve got a lot of different, special-case Web processing, or one need that is near-constant &#8212; such as processing images stored in a database every time a specific page is called &#8212; then you&#8217;ll want to consider a module. For occasional or lightweight processing, such as serving up a low-use RSS stream, a handler will do fine.</div>
<p>So that&#8217;s what we&#8217;ll use here. Let&#8217;s begin by creating an ASP.NET HTTP handler, which is written in the same way one would write the code behind for an ASP.NET page, but uses the file extension .ashx.<br />
<span id="more-3463"></span></p>
<h3>Creating An ASP.NET HTTP Handler</h3>
<p>Fortunately, handlers are very easy to create, especially if you&#8217;re using <a href="http://www.microsoft.com/visualstudio/en-us/" target="_blank">Visual Studio</a> / <a href="http://www.asp.net/vwd/" target="_blank">Visual Web Developer Express</a> as your <a href="http://en.wikipedia.org/wiki/Integrated_development_environment" target="_blank">IDE</a>. You can select it (&#8220;Generic Handler&#8221;) right from the Add New Item menu:</p>
<p><a href="http://www.dougv.com/wp-content/uploads/2010/12/addnewitem1.jpg"><img class="alignnone size-medium wp-image-3490" title="Visual Studio 2008 Add New Item Dialog Box" src="http://www.dougv.com/wp-content/uploads/2010/12/addnewitem1-500x327.jpg" alt="Visual Studio 2008 Add New Item Dialog Box" width="500" height="327" /></a></p>
<pre class="brush: vb; title: ; notranslate">&lt;@ WebHandler Language=&quot;VB&quot; Class=&quot;Handler&quot;; &gt;

Imports System
Imports System.Web

Public Class Handler : Implements IHttpHandler

    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
        context.Response.ContentType = &quot;text/plain&quot;
        context.Response.Write(&quot;Hello World&quot;)
    End Sub

    Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
        Get
            Return False
        End Get
    End Property

End Class</pre>
<p>What this really does is create a special class for handling our request. And since we may well have several different kinds of handlers in our Web application, we ought to change the name of the class to be more meaningful &#8212; that is, to better reflect what the class is actually doing.</p>
<p>In the case of our handler, we&#8217;re creating an RSS feed. So, let&#8217;s rename the handler to RSSFeed.ashx. If we do that at the time we create the handler, Visual Studio will make the necessary changes for us. However, if we&#8217;re making this file by hand, we need to declare the class name in our WebHander directive declaration:</p>
<pre class="brush: vb; title: ; notranslate">&lt;%@ WebHandler Language=&quot;VB&quot; Class=&quot;RSSFeed&quot; &gt;</pre>
<p>We also want to change the class declaration:</p>
<pre class="brush: vb; first-line: 6; title: ; notranslate">Public Class RSSFeed : Implements IHttpHandler</pre>
<h3>Add Required Namespaces</h3>
<p>With our HTTP handler created, we can move on to programming the specific solution. Let&#8217;s add the namespaces we need. I&#8217;m going to use an <a href="http://msdn.microsoft.com/en-us/library/system.xml.xmltextwriter.aspx" target="_blank">XMLTextWriter</a> to create the feed, and SQL Server to provide the data. Therefore, I need the <a href="http://msdn.microsoft.com/en-us/library/system.text.aspx" target="_blank">System.Text</a>, <a href="http://msdn.microsoft.com/en-us/library/system.xml.aspx" target="_blank">System.Xml</a>, <a href="http://msdn.microsoft.com/en-us/library/system.data.aspx" target="_blank">System.Data</a> and <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.aspx" target="_blank">System.Data.SqlClient</a> namespaces:</p>
<pre class="brush: vb; title: ; notranslate">&lt;@ WebHandler Language=&quot;VB&quot; Class=&quot;RSSFeed&quot; &gt;

Imports System
Imports System.Web
Imports System.Xml
Imports System.Text
Imports System.Data
Imports System.Data.SqlClient

Public Class RSSFeed : Implements IHttpHandler</pre>
<h3>Create Function To Retrieve Records From Database</h3>
<p>To help abstract this solution, I&#8217;m going to break out the process of getting the records from the database into a function. This function will return a <a href="http://msdn.microsoft.com/en-us/library/system.data.dataset.aspx" target="_blank">DataSet</a>, which I will consume in the ProcessRequest subroutine.</p>
<pre class="brush: vb; first-line: 69; title: ; notranslate">Private Function GetArticles() As DataSet
	Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings(&quot;my_connection_string&quot;).ConnectionString)
	Dim cmd As New SqlCommand(&quot;my_stored_procedure&quot;, conn)
	cmd.CommandType = CommandType.StoredProcedure

	Dim ds As New DataSet

	conn.Open()
	Dim da As New SqlDataAdapter(cmd)
	da.Fill(ds)
	conn.Close()
	cmd.Dispose()
	conn.Dispose()

	Return ds
End Function</pre>
<p>Note that I am not checking for errors here. That&#8217;s because I don&#8217;t know what might be an acceptable error-catching scheme for you, and I don&#8217;t want to complicate this post with error-trapping methodologies you cannot use. But you should definitely check for errors.</p>
<p>If anything goes wrong, the DataSet as written won&#8217;t have any <a href="http://msdn.microsoft.com/en-us/library/system.data.datatable.aspx" target="_blank">DataTable</a> objects;  you could always test for that, but I agree with <a href="http://twitter.com/#!/jsonmez" target="_blank">John Sonmez</a> at ElegantCode.com that <a href="http://elegantcode.com/2010/05/01/say-no-to-null/" target="_blank">throwing a null instead of an exception is a form of laziness</a>.</p>
<p>If I were writing this handler for production, I would add a <a href="http://msdn.microsoft.com/en-us/library/fk6t46tz.aspx" target="_blank">Try-Catch block</a>. How you trap DB errors is up to you, but again, you should definitely trap them.</p>
<h3>Prepare The Handler To Cache Results And Respond With The Proper Type</h3>
<p>I need to instruct the handler as to what content type it&#8217;s creating. And I also want to cache these results, so that I don&#8217;t call upon the database every time someone wants to access the feed.</p>
<p>I&#8217;ll set the handler to produce XML, with UTF-8 encoding, and to cache results for one hour.</p>
<pre class="brush: vb; first-line: 12; title: ; notranslate">Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
	'send document as response
	context.Response.ContentType = &quot;text/xml&quot;
	context.Response.ContentEncoding = System.Text.Encoding.UTF8
	context.Response.Cache.SetExpires(DateTime.Now.AddSeconds(3600))
	context.Response.Cache.SetCacheability(HttpCacheability.Public)</pre>
<p>Sure, I could have used <a href="http://msdn.microsoft.com/en-us/library/system.datetime.addhours.aspx" target="_blank">AddHours</a> instead of <a href="http://msdn.microsoft.com/en-us/library/system.datetime.addseconds.aspx" target="_blank">AddSeconds</a> here. That would have been better, but I&#8217;m a bit too lazy to change it now. I program a lot in PHP / JavaScript, too, so when working with time, I tend to go the <a href="http://en.wikipedia.org/wiki/Unix_time" target="_blank">Unix timestamp</a> route by default, which generally means working in seconds.</p>
<p>(<em>Aside on caching DB results:</em> If I wanted to get all fancy, I could set the handler&#8217;s cache expiration to whenever there are changes to the underlying SQL Server data, via the <a href="http://msdn.microsoft.com/en-us/library/ms178604.aspx" target="_blank">SqlCacheDependency</a> class. But that requires extra code and confuses the process to some extent, so I&#8217;ve simply fixed the cache time to one hour, which is the same as my feed&#8217;s <a href="http://cyber.law.harvard.edu/rss/rss.html#ltttlgtSubelementOfLtchannelgt" target="_blank">TTL</a>. <em>End of aside.</em>)</p>
<h3>Use XmlTextWriter To Create The RSS Feed</h3>
<p>With our records on hand, we can go ahead and create the feed. I do that with an XmlTextWriter that is set to become the output stream for the handler. (That is, I tell the handler, &#8220;Take a look at this here XmlTextWriter I&#8217;m making. You and it are the effectively same thing. Whatever it does, that&#8217;s what you&#8217;re doing.&#8221;)</p>
<p>I set the XmlTextWriter to encode its XML file in UTF-8, and then I create the opening <channel> data:</p>
<pre class="brush: vb; first-line: 19; highlight: [34,37]; title: ; notranslate">'create RSS xml document
Dim xml As New XmlTextWriter(context.Response.OutputStream, Encoding.UTF8)
xml.Formatting = Formatting.Indented

xml.WriteStartDocument()
xml.WriteStartElement(&quot;rss&quot;)
xml.WriteAttributeString(&quot;version&quot;, &quot;2.0&quot;)

'create feed header section
xml.WriteStartElement(&quot;channel&quot;)
xml.WriteElementString(&quot;title&quot;, &quot;ASP.NET RSS Feed - Web Handler Demo&quot;)
xml.WriteElementString(&quot;link&quot;, &quot;http://www.dougv.net&quot;)
xml.WriteElementString(&quot;description&quot;, &quot;A demonstration of using an ASP.NET Web Handler to create an RSS feed of SQL Server data&quot;)
xml.WriteElementString(&quot;language&quot;, &quot;en-us&quot;)
xml.WriteElementString(&quot;pubDate&quot;, DateTime.UtcNow.ToString(&quot;r&quot;))
xml.WriteElementString(&quot;lastBuildDate&quot;, DateTime.UtcNow.ToString(&quot;r&quot;))
xml.WriteElementString(&quot;managingEditor&quot;, &quot;dougvanderweide@gmail.com&quot;)
xml.WriteElementString(&quot;webMaster&quot;, &quot;dougvanderweide@gmail.com&quot;)
xml.WriteElementString(&quot;ttl&quot;, &quot;60&quot;)</pre>
<p>Note that, at Line 34, I use UTC time and output it in RFC1123 format. That&#8217;s the RSS standard.</p>
<p>Because I want to ensure as many RSS readers as possible access this file as little as necessary, I ensure that the last build date is easily understood, and provide my time-to-live value at Line 37. That way, a well-made RSS reader should locally cache the RSS feed until the last build date / TTL values indicate it&#8217;s time to get a fresh copy.</p>
<h3>Iterate Through The DataSet&#8217;s Records And Add Them As Items</h3>
<p>With that out of the way, we can now focus on the ProcessRequest subroutine. First, we create a local DataSet that calls the GetArticles() function, previously described. Once that&#8217;s loaded, we go ahead and iterate the results, adding each as an <item> of the feed:</p>
<pre class="brush: vb; first-line: 39; highlight: [50,51,52,54]; title: ; notranslate">'get top stories
Dim ds As DataSet = GetArticles()

'add stories to feed
Dim row As DataRow
For Each row In ds.Tables(0).Rows
	xml.WriteStartElement(&quot;item&quot;)
	xml.WriteElementString(&quot;title&quot;, row(&quot;article_title&quot;))
	xml.WriteElementString(&quot;link&quot;, row(&quot;article_link&quot;))

	'output story as cdata
	xml.WriteStartElement(&quot;description&quot;)
	xml.WriteCData(row(&quot;article_text&quot;))
	xml.WriteEndElement()

	xml.WriteElementString(&quot;pubDate&quot;, CType(row(&quot;article_date&quot;), DateTime).ToString(&quot;r&quot;))
	xml.WriteEndElement()
Next</pre>
<p>Some of the data I intend to output contains HTML entities (i.e., HTML markup). When you create an XML document that contains entities, you must output that data as <a href="http://www.w3schools.com/xml/xml_cdata.asp" target="_blank">CDATA</a>. So where before, I was using the <a href="http://msdn.microsoft.com/en-us/library/system.xml.xmlwriter.writeelementstring.aspx" target="_blank">WriteElementString</a> method to output quick-and-dirty child tags, Lines 50-52 use the necessarily much more verbose methods <a href="http://msdn.microsoft.com/en-us/library/t8t5yhhk.aspx" target="_blank">WriteStartElement</a>, <a href="http://msdn.microsoft.com/en-us/library/system.xml.xmlwriter.writecdata.aspx" target="_blank">WriteCdata</a> and <a href="http://msdn.microsoft.com/en-us/library/system.xml.xmlwriter.writeendelement.aspx" target="_blank">WriteEndElement</a>.</p>
<p>Lastly, note that at Line 54, I intentionally cast the database&#8217;s date value to <a href="http://msdn.microsoft.com/en-us/library/system.datetime.aspx" target="_blank">DateTime</a>, so that I can be absolutely certain that when I use <a href="http://msdn.microsoft.com/en-us/library/zdtaw1bw.aspx" target="_blank">ToString</a> to format it, I get the result I want.</p>
<h3>Close Tags, Flush The Buffer And Close The XmlTextWriter</h3>
<p>Now we can go ahead and close all open XML tags, flush the XmlTextWriter&#8217;s buffer (that is, go ahead and output the document), and close the XmlTextWriter. We can also declare the end of the ProcessRequest subroutine:</p>
<pre class="brush: vb; first-line: 58; title: ; notranslate">	'close channel
	xml.WriteEndElement()
	'close rss
	xml.WriteEndElement()
	'close document
	xml.WriteEndDocument()
	xml.Flush()
	xml.Close()

End Sub</pre>
<p>I use both the <a href="http://msdn.microsoft.com/en-us/library/system.xml.xmltextwriter.flush.aspx" target="_blank">Flush</a> and <a href="http://msdn.microsoft.com/en-us/library/system.xml.xmltextwriter.close.aspx" target="_blank">Close</a> methods on the XmlTextWriter to ensure that the handler is entirely clear that it can go ahead and send its response.</p>
<p>This is almost certainly overkill; I could probably get away with just calling Close. However, I don&#8217;t like chancing that the buffer will output completely to the handler&#8217;s response stream without an explicit instruction to do so, and that&#8217;s the primary purpose of Flush. So that&#8217;s why I call both.</p>
<h3>Demo, Download And Links</h3>
<p>And just like that, we have an RSS feed. You can see a working demo at <a href="http://www.dougv.net/demos/rss_web_handler/" target="_blank">http://www.dougv.net/demos/rss_web_handler/</a></p>
<p>I distribute this code under the GNU GPL version 3. Download the ASHX file: <a href="http://www.dougv.com/wp-content/uploads/2010/12/rssfeed.zip">Creating An ASP.NET RSS Feed, Using Data From SQL Server And HTTP WebHandler Sample Code</a></p>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/creating-an-asp-net-rss-feed-using-data-from-sql-server-and-http-webhandler" target="_blank">http://www.delicious.com/dougvdotcom/creating-an-asp-net-rss-feed-using-data-from-sql-server-and-http-webhandler</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2008/08/21/displaying-an-image-stored-in-a-sql-server-database-on-an-aspnet-page-using-vbnet/" rel="bookmark">Displaying An Image Stored In A SQL Server Database On An ASP.NET Page Using VB.NET</a> (30.4)</li>
				<li><a href="https://www.dougv.com/2010/10/04/backing-up-your-sql-server-database-to-sql-files-with-management-studio-express/" rel="bookmark">Backing Up Your SQL Server Database To SQL Files With Management Studio Express</a> (28.8)</li>
				<li><a href="https://www.dougv.com/2010/03/29/rss-feeds-now-show-full-entries/" rel="bookmark">RSS Feeds Now Show Full Entries</a> (19.7)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/google-reader/" title="Google Reader" rel="tag">Google Reader</a>, <a href="https://www.dougv.com/tag/iis/" title="IIS" rel="tag">IIS</a>, <a href="https://www.dougv.com/tag/metadata/" title="metadata" rel="tag">metadata</a>, <a href="https://www.dougv.com/tag/microsoft/" title="Microsoft" rel="tag">Microsoft</a>, <a href="https://www.dougv.com/tag/msdn/" title="MSDN" rel="tag">MSDN</a>, <a href="https://www.dougv.com/tag/rss/" title="RSS" rel="tag">RSS</a>, <a href="https://www.dougv.com/tag/visual-studio/" title="Visual Studio" rel="tag">Visual Studio</a>, <a href="https://www.dougv.com/tag/web-server/" title="web server" rel="tag">web server</a>, <a href="https://www.dougv.com/tag/web-services/" title="Web Services" rel="tag">Web Services</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/12/11/creating-an-asp-net-rss-feed-using-data-from-sql-server-and-http-webhandler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom ErrorDocuments Available For Download</title>
		<link>https://www.dougv.com/2010/10/05/custom-errordocuments-available-for-download/</link>
		<comments>https://www.dougv.com/2010/10/05/custom-errordocuments-available-for-download/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 18:25:16 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3369</guid>
		<description><![CDATA[After writing so much about the ASP.NET cryptographic padding oracle exploit, and the recommended workaround of a static error document, it dawned on me that I should probably make some custom error documents for my domains. And then I decided I should share them. So, if you&#8217;re so inclined, you can download the custom error [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/04/23/idroid-andriod-os-port-for-iphone-2g-available-for-download-from-mediafire/" rel="bookmark">idroid Android OS Port For iPhone 2G Available For Download From MediaFire</a> (15.5)</li>
				<li><a href="https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/" rel="bookmark">Major Security Hole In ASP.NET Requires Error Redirect Workaround</a> (8.8)</li>
				<li><a href="https://www.dougv.com/2010/09/27/asp-net-crypto-exploit-patch-ships-tuesday-sept-28/" rel="bookmark">ASP.NET Crypto Exploit Patch Ships Tuesday, Sept. 28</a> (6.9)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>After writing so much about the <a href="http://www.microsoft.com/technet/security/advisory/2416728.mspx" target="_blank">ASP.NET cryptographic padding oracle exploit</a>, and the <a href="http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx" target="_blank">recommended workaround</a> of a static error document, it dawned on me that I should probably make some custom error documents for my domains.</p>
<p>And then I decided I should share them. So, if you&#8217;re so inclined, you can <a href="http://www.dougv.com/wp-content/uploads/2010/10/error_docs.zip">download the custom error documents I use on this site</a>. I release all code under the latest version of the GNU GPL.</p>
<p>I&#8217;ve created pages for 401 (unauthorized), 403 (forbidden), 404 (not found) and 500 (internal server) HTTP errors. Here&#8217;s how they look <em>(click thumbnails for larger image)</em>:</p>
<p><a href="http://www.dougv.com/wp-content/uploads/2010/10/401.jpg"><img class="alignnone size-thumbnail wp-image-3378" title="ErrorDocument 401" src="http://www.dougv.com/wp-content/uploads/2010/10/401-150x112.jpg" alt="ErrorDocument 401" width="150" height="112" /></a> <a href="http://www.dougv.com/wp-content/uploads/2010/10/403.jpg"><img class="alignnone size-thumbnail wp-image-3379" title="ErrorDocument 403" src="http://www.dougv.com/wp-content/uploads/2010/10/403-150x112.jpg" alt="ErrorDocument 403" width="150" height="112" /></a> <a href="http://www.dougv.com/wp-content/uploads/2010/10/404.jpg"><img class="alignnone size-thumbnail wp-image-3380" title="ErrorDocument 404" src="http://www.dougv.com/wp-content/uploads/2010/10/404-150x112.jpg" alt="ErrorDocument 404" width="150" height="112" /></a> <a href="http://www.dougv.com/wp-content/uploads/2010/10/500.jpg"><img class="alignnone size-thumbnail wp-image-3381" title="ErrorDocument 500" src="http://www.dougv.com/wp-content/uploads/2010/10/500-150x112.jpg" alt="ErrorDocument 500" width="150" height="112" /></a></p>
<p>I designed these to be valid XHTML 1.0; to appear well in all screen resolutions from 1024 x 768 and greater; and to appear the same on most Web browsers. (Of course, I exclude Internet Explorer prior to version 7 from that list.)</p>
<p>This little exercise also gave me a chance to play with the <a href="http://code.google.com/apis/webfonts/" target="_blank">Google Font API</a>. There aren&#8217;t a lot of fonts available yet, but using the API couldn&#8217;t be simpler.</p>
<p>Instructions on implementing custom error document on Apache can be found <a href="http://www.htaccesselite.com/htaccess/htaccess-errordocument-examples-vt11.html" target="_blank">here</a>. Microsoft documents how to add customError files to your ASP.NET web.config file <a href="http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx" target="_blank">here</a>.</p>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/custom-errordocuments-available-for-download" target="_blank">http://www.delicious.com/dougvdotcom/custom-errordocuments-available-for-download</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/04/23/idroid-andriod-os-port-for-iphone-2g-available-for-download-from-mediafire/" rel="bookmark">idroid Android OS Port For iPhone 2G Available For Download From MediaFire</a> (15.5)</li>
				<li><a href="https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/" rel="bookmark">Major Security Hole In ASP.NET Requires Error Redirect Workaround</a> (8.8)</li>
				<li><a href="https://www.dougv.com/2010/09/27/asp-net-crypto-exploit-patch-ships-tuesday-sept-28/" rel="bookmark">ASP.NET Crypto Exploit Patch Ships Tuesday, Sept. 28</a> (6.9)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/apache/" title="Apache" rel="tag">Apache</a>, <a href="https://www.dougv.com/tag/google/" title="Google" rel="tag">Google</a>, <a href="https://www.dougv.com/tag/iis/" title="IIS" rel="tag">IIS</a>, <a href="https://www.dougv.com/tag/microsoft/" title="Microsoft" rel="tag">Microsoft</a>, <a href="https://www.dougv.com/tag/msdn/" title="MSDN" rel="tag">MSDN</a>, <a href="https://www.dougv.com/tag/web-server/" title="web server" rel="tag">web server</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/10/05/custom-errordocuments-available-for-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FAQ Released For Microsoft ASP.NET CryptographicException Attack</title>
		<link>https://www.dougv.com/2010/09/21/faq-released-for-microsoft-asp-net-cryptographicexception-attack/</link>
		<comments>https://www.dougv.com/2010/09/21/faq-released-for-microsoft-asp-net-cryptographicexception-attack/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 05:19:01 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Scott Guthrie]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3328</guid>
		<description><![CDATA[Scott Guthrie, Microsoft&#8217;s corporate vice president for the .NET platform, posted on his blog late Monday a FAQ about the ASP.NET CryptographicException vulnerability. Highlights: All versions of ASP.NET are affected. That includes WebForms and MVC versions 1 and 2. Sharepoint is affected, too. A workaround on how to employ a new generic error document for [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/04/29/live-from-the-microsoft-launch-2010-event-in-boston/" rel="bookmark">Live From The Microsoft Launch 2010 Event In Boston</a> (18.3)</li>
				<li><a href="https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/" rel="bookmark">Major Security Hole In ASP.NET Requires Error Redirect Workaround</a> (18.3)</li>
				<li><a href="https://www.dougv.com/2006/11/11/using-national-weather-service-xml-feeds-with-aspnet-adonet-and-xsl/" rel="bookmark">Using National Weather Service XML Feeds With ASP.NET, ADO.NET And XSL</a> (11.7)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>Scott Guthrie, Microsoft&#8217;s corporate vice president for the .NET platform, posted on his blog late Monday <a href="http://weblogs.asp.net/scottgu/archive/2010/09/20/frequently-asked-questions-about-the-asp-net-security-vulnerability.aspx" target="_blank">a FAQ</a> about <a href="http://www.microsoft.com/technet/security/advisory/2416728.mspx" target="_blank">the ASP.NET CryptographicException vulnerability</a>.</p>
<p>Highlights:</p>
<ul>
<li><strong>All versions of ASP.NET are affected.</strong> That includes WebForms and MVC versions 1 and 2.</li>
<li><strong>Sharepoint is affected, too.</strong> A workaround on how to employ a new generic error document for Sharepoint is <a href="http://blogs.msdn.com/b/sharepoint/archive/2010/09/21/security-advisory-2416728-vulnerability-in-asp-net-and-sharepoint.aspx" target="_blank">detailed at that team&#8217;s blog</a>.</li>
<li><strong>Everyone should employ the recommended workarounds</strong>.</li>
<li><strong>You have to route all HTTP errors to the workaround&#8217;s generic error page. </strong>Otherwise, the hack still works.</li>
<li><strong>A patch will be released as a Windows Update hotfix</strong>, but no release date has been set yet.</li>
<li><strong>Check your logs for CryptographicException errors.</strong> If you see them, it&#8217;s possible you are being probed.</li>
</ul>
<p>I take this very seriously. There&#8217;s a tool and <a href="http://threatpost.com/en_us/blogs/demo-aspnet-padding-oracle-attack-091710" target="_blank">video tutorial</a> out there detailing how to run this exploit, so every script kiddie in the world is looking for sites to exploit, I am sure.</p>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/faq-released-for-microsoft-asp-net-cryptographicexception-attack" target="_blank">http://www.delicious.com/dougvdotcom/faq-released-for-microsoft-asp-net-cryptographicexception-attack</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/04/29/live-from-the-microsoft-launch-2010-event-in-boston/" rel="bookmark">Live From The Microsoft Launch 2010 Event In Boston</a> (18.3)</li>
				<li><a href="https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/" rel="bookmark">Major Security Hole In ASP.NET Requires Error Redirect Workaround</a> (18.3)</li>
				<li><a href="https://www.dougv.com/2006/11/11/using-national-weather-service-xml-feeds-with-aspnet-adonet-and-xsl/" rel="bookmark">Using National Weather Service XML Feeds With ASP.NET, ADO.NET And XSL</a> (11.7)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/iis/" title="IIS" rel="tag">IIS</a>, <a href="https://www.dougv.com/tag/microsoft/" title="Microsoft" rel="tag">Microsoft</a>, <a href="https://www.dougv.com/tag/msdn/" title="MSDN" rel="tag">MSDN</a>, <a href="https://www.dougv.com/tag/scott-guthrie/" title="Scott Guthrie" rel="tag">Scott Guthrie</a>, <a href="https://www.dougv.com/tag/visual-studio/" title="Visual Studio" rel="tag">Visual Studio</a>, <a href="https://www.dougv.com/tag/web-server/" title="web server" rel="tag">web server</a>, <a href="https://www.dougv.com/tag/web-services/" title="Web Services" rel="tag">Web Services</a>, <a href="https://www.dougv.com/tag/windows-server/" title="Windows Server" rel="tag">Windows Server</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/09/21/faq-released-for-microsoft-asp-net-cryptographicexception-attack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Major Security Hole In ASP.NET Requires Error Redirect Workaround</title>
		<link>https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/</link>
		<comments>https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 14:44:26 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[Scott Guthrie]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[web server]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3316</guid>
		<description><![CDATA[A major security flaw in ASP.NET was announced on Friday &#8212; one that affects all versions and can allow an attacker to see ViewState and web.config data in clear text. As such, everyone who has made an ASP.NET Web site should take this threat very seriously. Microsoft is putting together a patch. Until then, they [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/09/13/xkcd-nails-the-real-security-threat/" rel="bookmark">xkcd Nails The Real Security Threat</a> (14.5)</li>
				<li><a href="https://www.dougv.com/2006/12/09/fixing-a-bad-minute-error-message-when-trying-to-use-crontab-with-certain-unix-text-editors/" rel="bookmark">Fixing A &quot;Bad Minute&quot; Error Message When Trying To Use Crontab With Certain Unix Text Editors</a> (13.5)</li>
				<li><a href="https://www.dougv.com/2008/06/10/fixing-an-unterminated-string-literal-error-in-an-ajax-javascript-httprequest/" rel="bookmark">Fixing An &quot;Unterminated String Literal&quot; Error In An AJAX JavaScript HttpRequest</a> (12.9)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://www.microsoft.com/technet/security/advisory/2416728.mspx" target="_blank">major security flaw</a> in ASP.NET was announced on Friday &#8212; one that <a href="http://blogs.technet.com/b/srd/archive/2010/09/17/understanding-the-asp-net-vulnerability.aspx" target="_blank">affects all versions</a> and can allow an attacker to see <a href="http://msdn.microsoft.com/en-us/library/ms972976.aspx" target="_blank">ViewState</a> and web.config data in clear text.</p>
<p>As such, everyone who has made an ASP.NET Web site should take this threat very seriously.</p>
<p>Microsoft is putting together a patch. Until then, they <a href="http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx" target="_blank">suggest a workaround of turning <em>on</em> customErrors</a>, and having it point to a single error file.</p>
<p>For ASP.NET versions 1.x, 2.0 and 3.5, create a single HTML-based error page, upload it to the root directory of your Web site, then add or change the <a href="http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx" target="_blank">customErrors</a> section in your web.config file with the following:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;configuration&gt;
   &lt;system.web&gt;
      &lt;customErrors mode=&quot;On&quot; defaultRedirect=&quot;~/error.html&quot; /&gt;
   &lt;/system.web&gt;
&lt;/configuration&gt;
</pre>
<p>Where, of course, error.html is the name of the error page you made.</p>
<p>If your site uses ASP.NET 3.5 SP1 or ASP.NET 4.0, use the custom ASPX error page located on Scott Guthrie&#8217;s blog (VB and C# versions), and change the customErrors section of your web.config file thus:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;configuration&gt;
   &lt;system.web&gt;
     &lt;customErrors mode=&quot;On&quot; redirectMode=&quot;ResponseRewrite&quot; defaultRedirect=&quot;~/error.aspx&quot; /&gt;
   &lt;/system.web&gt;
&lt;/configuration&gt;
</pre>
<p>Where, of course, error.aspx is the name of the error page you created.</p>
<p>To make things easier, I have <a href='http://www.dougv.com/wp-content/uploads/2010/09/aspnet_error_files.zip'>zipped up copies of the three error documents</a>  &#8212; error.html, and the VB.NET / C# versions of the ASP.NET error files &#8212; for download. I distribute all code under the GNU GPL.</p>
<p>I&#8217;m taking this threat very seriously and have patched all my ASP.NET sites as advised.</p>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/major-security-hole-in-asp-net-requires-error-redirect-workaround">http://www.delicious.com/dougvdotcom/major-security-hole-in-asp-net-requires-error-redirect-workaround</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/09/13/xkcd-nails-the-real-security-threat/" rel="bookmark">xkcd Nails The Real Security Threat</a> (14.5)</li>
				<li><a href="https://www.dougv.com/2006/12/09/fixing-a-bad-minute-error-message-when-trying-to-use-crontab-with-certain-unix-text-editors/" rel="bookmark">Fixing A &quot;Bad Minute&quot; Error Message When Trying To Use Crontab With Certain Unix Text Editors</a> (13.5)</li>
				<li><a href="https://www.dougv.com/2008/06/10/fixing-an-unterminated-string-literal-error-in-an-ajax-javascript-httprequest/" rel="bookmark">Fixing An &quot;Unterminated String Literal&quot; Error In An AJAX JavaScript HttpRequest</a> (12.9)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/hacking/" title="hacking" rel="tag">hacking</a>, <a href="https://www.dougv.com/tag/iis/" title="IIS" rel="tag">IIS</a>, <a href="https://www.dougv.com/tag/microsoft/" title="Microsoft" rel="tag">Microsoft</a>, <a href="https://www.dougv.com/tag/msdn/" title="MSDN" rel="tag">MSDN</a>, <a href="https://www.dougv.com/tag/rewrite/" title="rewrite" rel="tag">rewrite</a>, <a href="https://www.dougv.com/tag/scott-guthrie/" title="Scott Guthrie" rel="tag">Scott Guthrie</a>, <a href="https://www.dougv.com/tag/visual-studio/" title="Visual Studio" rel="tag">Visual Studio</a>, <a href="https://www.dougv.com/tag/web-server/" title="web server" rel="tag">web server</a>, <a href="https://www.dougv.com/tag/windows-server/" title="Windows Server" rel="tag">Windows Server</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New England GiveCamp 2010: What A Great Experience</title>
		<link>https://www.dougv.com/2010/06/16/new-england-givecamp-2010-what-a-great-experience/</link>
		<comments>https://www.dougv.com/2010/06/16/new-england-givecamp-2010-what-a-great-experience/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 21:05:47 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[Customer Relations]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[elegance]]></category>
		<category><![CDATA[GiveCamp]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Jim O'Neil]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Quickbooks]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3216</guid>
		<description><![CDATA[The first New England GiveCamp was this weekend at Microsoft&#8217;s Northeast Research and Development building in Cambridge, MA, and it was, by far, one of the most rewarding experiences I&#8217;ve had in the 15 years I have been professionally coding. About 100 technical and non-technical volunteers spent the weekend of June 11-13 writing code for [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/05/13/designers-and-developers-donate-your-time-talent-at-new-england-give-camp-june-11-13-2010/" rel="bookmark">Designers And Developers: Donate Your Time, Talent At New England GiveCamp, June 11-13, 2010</a> (31.7)</li>
				<li><a href="https://www.dougv.com/2010/06/10/at-new-england-givecamp-this-weekend/" rel="bookmark">At New England GiveCamp This Weekend</a> (23.3)</li>
				<li><a href="https://www.dougv.com/2010/04/29/live-from-the-microsoft-launch-2010-event-in-boston/" rel="bookmark">Live From The Microsoft Launch 2010 Event In Boston</a> (20)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.newenglandgivecamp.org" target="_blank"><img class="alignleft" title="New England GiveCamp 2010" src="http://eventbrite-s3.s3.amazonaws.com/eventlogos/3133703/658584845.png" alt="New England GiveCamp 2010" width="305" height="200" /></a>The first <a href="http://www.newenglandgivecamp.org" target="_blank">New England GiveCamp</a> was this weekend at <a href="http://microsoftcambridge.com/Default.aspx" target="_blank">Microsoft&#8217;s Northeast Research and Development</a> building in Cambridge, MA, and it was, by far, one of the most rewarding experiences I&#8217;ve had in the 15 years I have been professionally coding.</p>
<p>About 100 technical and non-technical volunteers spent the weekend of June 11-13 writing code for charities. Most projects were Web site upgrades &#8212; either installing a content management system, or extending that system to do something it didn&#8217;t do before, such as collecting very specific data, integrating with a customer relationship management tool, etc.</p>
<p>Other projects were more complex. For example, my project was data normalization and version control.</p>
<p>I was assigned to the <a href="http://www.goshenlandtrust.org/Site/Home.html" target="_blank">Goshen Land Trust</a>, a charity that protects open and green space in Goshen, CT. My team members were Kriss Aho and Pat Tormey, both from the Boston area; and Chris Craig, the president of GLT.</p>
<p>Prior to last weekend, GLT tracked all its customer relationships in Excel spreadsheets. They do their accounting in Quickbooks.</p>
<p>If someone was a volunteer, his name went into the volunteer spreadsheet. If he owned land, his name was in the landowner spreadsheet. If he was a land or money donor, his name went into another spreadsheet. And so on, and so on; this story has been told a thousand times before, we all know it by heart.</p>
<p>And, of course, there were several versions of each of these spreadsheets out there: They were exchanged back and forth via e-mail, meaning no two copies of the same spreadsheet were alike. Again, stop me if you&#8217;ve heard this one before.</p>
<p>Finally, donor payments are managed entirely separate from the spreadsheets, via entries into Quickbooks. So there&#8217;s a completely different store of around 800 mostly duplicate names in Quickbooks, too, which isn&#8217;t easily compared to a spreadsheet of about 2,000 names.</p>
<p>So we had to figure out a way to impose some version control on these sheets; we had to create a master data store, so we could have an authoritative source of customer relationship information; and we had to sync customer information in Quickbooks to match the master data store.</p>
<p>Sounds like fun, I know. It actually was, after it stopped being awful.<br />
<span id="more-3216"></span></p>
<h3>If It&#8217;s Half-Broke, Fix The Half That&#8217;s Broke</h3>
<div class="wp-caption alignright" style="width: 250px"><a href="http://www.flickr.com/photos/dougvdotcom/4704256370/" target="_blank"><img title="Kriss Aho and Chris Craig, Goshen Land Trust, at New England GiveCamp 2010" src="http://farm5.static.flickr.com/4035/4704256370_dbcc1b084e_m.jpg" alt="Kriss Aho and Chris Craig, Goshen Land Trust, at New England GiveCamp 2010" width="240" height="179" /></a><p class="wp-caption-text">Kriss Aho and Chris Craig, Goshen Land Trust, at New England GiveCamp 2010.</p></div>
<p>We wound up doing the real scoping for this project on Friday night, where the initial project parameters changed from a simple training exercise to the data normalization project we wound up doing.</p>
<p>My immediate thought, as we were discussing how to tame these spreadsheets, turned to <a href="http://civicrm.org/" target="_blank">CiviCRM</a>. It&#8217;s an open-source, Web-based customer relationship management tool that is designed specifically for nonprofits, and that would have fit Goshen Land Trust&#8217;s needs nicely.</p>
<p>But that idea suffered a few significant flaws. The biggest problem was, none of the end users have any experience with CRM software in the first place, nonetheless CiviCRM, and we didn&#8217;t want to force a solution on to people who hadn&#8217;t bought in to the solution beforehand.</p>
<p>In other words, if Excel was getting the job done, except for the fact that none of the data jived among the sheets, then let&#8217;s stick with Excel, or at least spreadsheets, since everyone is comfortable with that.</p>
<p>We would simply combine all the current sheets into one &#8220;master&#8221; spreadsheet. Every person would be a row; every conceivable relationship and bit of information about that person would be a column.</p>
<p>Was this the cleanest, most elegant solution to the problem? No. But  it&#8217;s one that meets the client&#8217;s needs and expectations, and it&#8217;s  something we could do over the weekend. Or, to be more specific, that Kriss could do over the weekend. I got a different assignment; more on that in a moment.</p>
<p>In a perfect world, we would have discussed the project sooner and given  the Goshen Land Trust a chance to check out CiviCRM. But again, Chris said he was OK with sticking with Excel, so long as the versioning issue was fixed; and Kriss could combine the sheets with minimal data mangling and need for cleanup by hand.</p>
<p>So the master data store problem was fixed. Now we needed to address version control. The answer to that was Google Docs.</p>
<p>Since the spreadsheet in question is &#8220;flat&#8221; &#8212; that is, one sheet, with many columns reflecting every relationship &#8212; we didn&#8217;t have to worry about macros, VBA scripts or other Excel-only attributes.</p>
<p>We also didn&#8217;t need complex user permissions: One guy owns the sheet, a few people need to be able to edit it and a few more need to be able to look at it. Google Docs has that built-in.</p>
<p>So we could just pop our master sheet into the cloud, set up some Google accounts and everyone would have access to one copy of one thing. Problem No. 2 solved.</p>
<h3>Quickbooks, How Do I Hate Thee? Let Me Count The Ways &#8230;</h3>
<div class="wp-caption alignleft" style="width: 510px"><a href="http://www.flickr.com/photos/42485399@N08/4699898271/" target="_blank"><img title="Kriss Aho, Doug Vanderweide, Chris Craig, Pat Tormey: The Goshen Land Trust team for New England GiveCamp 2010 " src="http://farm2.static.flickr.com/1275/4699898271_845b18f2e7_d.jpg" alt="Kriss Aho, Doug Vanderweide, Chris Craig, Pat Tormey: The Goshen Land Trust team for New England GiveCamp 2010 " width="500" height="333" /></a><p class="wp-caption-text">I&#39;m smiling here, but by the time this photo was taken -- aroud 4:30 pm on Saturday -- the Quickbooks SDK had shattered all my hopes and dreams. Kriss Aho, me, Chris Craig of Goshen Land Trust and Pat Tormey, our project leader. Via jflinskey on Flickr.</p></div>
<p>Problem No. 3 fell to me: How do we synchronize the contact information being kept in the spreadsheet with the customer data being stored in Quickbooks?</p>
<p>My kingdom for a unique key, is the answer.</p>
<p>Because syncing records in two data stores was never a consideration before, GLT&#8217;s roughly 800 Quickbooks customers were recorded in ways that generally weren&#8217;t easy to match against the spreadsheets they maintained. I tried <a href="http://support.quickbooks.intuit.com/Support/Pages/InProductHelp/Core/QB2K5/pro/excel_p/task_import_Excel_file.html" target="_blank">a mapped Excel import into Quickbooks</a> of data in the spreadsheets, and came up with what was at least a 70 percent match failure rate.</p>
<p>It quickly became apparent I was going to need a unique key. The question was, how could I get a key other than Customer Name out of Quickbooks, since customer name is the only unique key exposed by built-in import / export functions, and clearly that wasn&#8217;t going to work?</p>
<p>The answer was the <a href="http://qbsdk.developer.intuit.com/sdk/qb" target="_blank">Quickbooks SDK</a>, one of the sorriest, worst-documented excuses for a programming tool I&#8217;ve ever encountered. The only way to get access to Quickbooks&#8217; internal unique identifier for customer objects is via the SDK.</p>
<p>My suggestion: If you ever need to do a Quickbooks SDK project in a weekend, and you haven&#8217;t used the Quickbooks SDK before, don&#8217;t bother.</p>
<p>The Quickbooks SDK provides, at the desktop level, two ways to get data.</p>
<p>The first, oldest and the one I chose was qbXML, which is basically <a href="http://en.wikipedia.org/wiki/SOAP" target="_blank">SOAP</a>: You present an XML request, you get an XML response. I have experience working with XML-RPC, Web services and XML in general, so this seemed the smart way to go.</p>
<p>The other is QBFC, which is more like writing a traditional object-based program using classes, methods and properties. This is the way I would have preferred to go, had the Quickbooks SDK&#8217;s documentation made that an option.</p>
<p>When I call the Quickbooks SDK &#8220;poorly documented,&#8221; what I mean is that it completely lacks object or entity references. As in, don&#8217;t bother trying to look up what classes, methods, properties or XML markup you should use, or what arguments any of them take. It isn&#8217;t written down anywhere. Not in the SDK documentation, not on <a href="http://developer.intuit.com/" target="_blank">Intuit&#8217;s Web site</a>, not on the Interweb. Apparently, the <a href="http://www.conspiracyarchive.com/" target="_blank">Illuminati</a> are keeping it a secret.</p>
<p>To figure out what you should do for a Quickbooks SDK project, you need to reverse-engineer a bunch of sample projects that come in the SDK. There is a &#8220;jump start&#8221; PDF that explains the basics of making requests and handling responses, but they&#8217;re written in <a href="http://msdn.microsoft.com/en-us/vbasic/ms788229.aspx" target="_blank">Visual Basic 6</a>, apparently by some junior-college student who&#8217;s being way too verbose in order to show his work to the professor.</p>
<p>(And yes, you guessed it: The Quickbooks SDK is straight-up <a href="http://msdn.microsoft.com/en-us/vbasic/ms788229.aspx" target="_blank">COM+</a>. You must install at least one DLL on each machine that wants to run an SDK application.)</p>
<p>Thankfully, there are plenty of XML, XSLT and similar sample files in the SDK for both qbXML and QBFC, covering virtually anything you could want or do; so one can hammer out a solution that&#8217;s a mashup of a provided sample.</p>
<p>Unless time and experience with the SDK aren&#8217;t luxuries you enjoy. Which was certainly the case for me this weekend.</p>
<p>My original goal was to create, in Quickbooks itself, a macro that would directly grab the online spreadsheet (via <a href="http://www.json.org/" target="_blank">JSON</a> requests to the <a href="http://code.google.com/apis/spreadsheets/data/3.0/developers_guide.html" target="_blank">Google Spreadsheets Data API</a>), match up my records, correct any customer contact info that is wrong in Quickbooks with information from the online spreadsheet, and report results.</p>
<p><a href="http://en.wikipedia.org/wiki/To_a_Mouse" target="_blank">Cue Robert Burns</a>.</p>
<p>It was everything I could do over the weekend to get Quickbooks to give me the customer list as an XML file. And that XML file has multiple object levels, but no schema definition or namespace declaration available anyplace, either. Again: Worst. SDK. Ever.</p>
<p>So now I need to apply <a href="http://www.w3schools.com/xsl/" target="_blank">XSL</a> to flatten it out, for purposes of comparing it to the online spreadsheet.</p>
<p>Needless to say, I&#8217;m still working on the project. My new plan:</p>
<ol>
<li>Create my record-flattening XSL.</li>
<li>Have my program run standalone.</li>
<li>Compare whatever is in the Quickbooks Customer List against the online spreadsheet.
<ol>
<li>Any unique ID that is in the Quickbooks Customer List, but not in the online spreadsheet, is listed in a new Excel sheet, for manual updating.</li>
<li>Any unique ID that is in Quickbooks, but has address / contact information that doesn&#8217;t match the online spreadsheet, is reported to a new Excel sheet, for manual updating.</li>
</ol>
</li>
</ol>
<p>I figure I&#8217;m about six hours out from being done. And I will deliver this. Because <em>now, it&#8217;s personal. </em>And when I&#8217;m done, I&#8217;m going to blog about it, so the next poor soul has a head start.</p>
<h3>The Experience Was Amazing</h3>
<div class="wp-caption alignleft" style="width: 510px"><a href="http://www.flickr.com/photos/dougvdotcom/4703617151/" target="_blank"><img class=" " title="Pat Tormey, my project leader, at New England GiveCamp 2010" src="http://farm5.static.flickr.com/4042/4703617151_bedcb02bbc.jpg" alt="Pat Tormey, my project leader, at New England GiveCamp 2010" width="500" height="374" /></a><p class="wp-caption-text">Pat Tormey, my project leader, at New England GiveCamp 2010. Taken about two hours before the event&#39;s end on Sunday, he&#39;s pretty relaxed for a guy who was just told the project wouldn&#39;t be done in time. Just another in a long list of reasons to like him.</p></div>
<p>OK, I admit I&#8217;m being overly dramatic about the Quickbooks SDK. But it was such an intense experience, being part of New England GiveCamp, that you will have to grant me some poetic license.</p>
<p>Cambridge, MA, the <a href="http://web.mit.edu/visit/" target="_blank">MIT campus</a> and the NERD building are completely awesome.</p>
<p>The entire city is a visual feast: architecture, art, people, happenings; you name it, there&#8217;s something interesting to look at anywhere you go, at all hours.</p>
<p>The Charles River has become quite a centerpiece, too. On Friday and Saturday nights I opted to walk from NERD to the <a href="http://cambridge.hyatt.com/hyatt/hotels/index.jsp" target="_blank">Hyatt Regency Cambridge</a> hotel, where I was staying, which are about two miles apart on Memorial Drive.</p>
<p>That walk could not have been more pleasant. The Boston skyline at night is beautiful, and the buildings I passed on the way were all alive with the sounds of music and conversation and celebration.</p>
<p>Every morning, I took a cab in to prevent getting sweaty; on Saturday morning, I passed <a href="http://www.hcs.harvard.edu/~harvcrew/" target="_blank">Harvard crew practice</a>. (Memo to them: Time for a Web site redesign.)</p>
<p>I know, I should have taken pictures. The entire weekend, I kept saying, &#8220;next time.&#8221; Until I ran out of next times. So, next time.</p>
<p>The Hyatt is a very nice hotel, too. The glass elevators are kind of cool; the bed was completely awesome, and the room was more than sufficient in size for one person.</p>
<p>I did give the restaurant / lounge a try on Saturday night; they charged me $17 for 32 oz. of beer, served in a mimosa glass and milk pitcher, which I thought was pretty silly. They also messed up my hamburger order, but gave it to me for free as a result.</p>
<p>I made the mistake of reserving a room at the last minute &#8212; <a href="http://www.priceline.com" target="_blank">priceline.com</a> completely came up short on reasonable, affordable alternatives &#8212; so it was hard to get the Microsoft corporate rate, but after a series of phone and e-mail exchanges, I managed to get in at the last minute.</p>
<p>So I would happily recommend the Hyatt Regency if you&#8217;re staying in the Boston area. They were very accommodating, no pun intended.</p>
<h3>Such Interesting People And Causes, Too</h3>
<p>The people at GiveCamp were pretty interesting, too: Both the developers and the charities.</p>
<p>I reconnected with Greg Howe, who I went to college with and who co-manages the <a href="http://www.bangordevelopers.com/" target="_blank">Bangor Area .NET Development</a> group. Greg is exceptionally well-versed in Web security and gave a talk during the event.</p>
<p>I met Alexander Lee, whose charity, <a href="http://www.laundrylist.org/" target="_blank">Project Laundry List</a>, advocates line-drying clothes as a green technology; it sounds silly to a country boy like me, but in many places in the world, a clothes line is a practical, or political, impossibility.</p>
<p>I wanted to meet, but couldn&#8217;t manage it, <a href="http://sparechangenews.net/" target="_blank">Spare Change News</a>, a newspaper produced and distributed by the homeless, which I thought was probably one of the most interesting ideas I&#8217;ve heard in a while; rather than trying to get the homeless to not be homeless, it aims to provide the homeless with the information and financial support to meet their needs.</p>
<p>The event was full of incredible people doing incredible things. You couldn&#8217;t help but be inspired and driven to give your best.</p>
<p>I figured that at worst, the GiveCamp experience would be an opportunity to help out some people who needed it and to jabber with some like-minded souls. Turns out it was that and more.</p>
<p>It plain feels good to have made a difference to someone else. It plain feels good to have been in the company of unselfish people for a weekend. It plain feels good to have been in a beautiful place for a weekend. And it plain feels good to have been thanked by people doing largely thankless work.</p>
<p>Count on me for New England GiveCamp 2011 and beyond.</p>
<p>All links in this post on delicious: <a href="http://delicious.com/dougvdotcom/new-england-givecamp-2010-what-a-great-experience" target="_blank">http://delicious.com/dougvdotcom/new-england-givecamp-2010-what-a-great-experience</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/05/13/designers-and-developers-donate-your-time-talent-at-new-england-give-camp-june-11-13-2010/" rel="bookmark">Designers And Developers: Donate Your Time, Talent At New England GiveCamp, June 11-13, 2010</a> (31.7)</li>
				<li><a href="https://www.dougv.com/2010/06/10/at-new-england-givecamp-this-weekend/" rel="bookmark">At New England GiveCamp This Weekend</a> (23.3)</li>
				<li><a href="https://www.dougv.com/2010/04/29/live-from-the-microsoft-launch-2010-event-in-boston/" rel="bookmark">Live From The Microsoft Launch 2010 Event In Boston</a> (20)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/elegance/" title="elegance" rel="tag">elegance</a>, <a href="https://www.dougv.com/tag/givecamp/" title="GiveCamp" rel="tag">GiveCamp</a>, <a href="https://www.dougv.com/tag/google/" title="Google" rel="tag">Google</a>, <a href="https://www.dougv.com/tag/jim-oneil/" title="Jim O&#039;Neil" rel="tag">Jim O&#039;Neil</a>, <a href="https://www.dougv.com/tag/marketing/" title="marketing" rel="tag">marketing</a>, <a href="https://www.dougv.com/tag/microsoft/" title="Microsoft" rel="tag">Microsoft</a>, <a href="https://www.dougv.com/tag/msdn/" title="MSDN" rel="tag">MSDN</a>, <a href="https://www.dougv.com/tag/quickbooks/" title="Quickbooks" rel="tag">Quickbooks</a>, <a href="https://www.dougv.com/tag/web-services/" title="Web Services" rel="tag">Web Services</a>, <a href="https://www.dougv.com/tag/xslt/" title="XSLT" rel="tag">XSLT</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/06/16/new-england-givecamp-2010-what-a-great-experience/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Designers And Developers: Donate Your Time, Talent At New England GiveCamp, June 11-13, 2010</title>
		<link>https://www.dougv.com/2010/05/13/designers-and-developers-donate-your-time-talent-at-new-england-give-camp-june-11-13-2010/</link>
		<comments>https://www.dougv.com/2010/05/13/designers-and-developers-donate-your-time-talent-at-new-england-give-camp-june-11-13-2010/#comments</comments>
		<pubDate>Fri, 14 May 2010 00:49:33 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Microsoft Office]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Transact-SQL]]></category>
		<category><![CDATA[VBA]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[crowdsourcing]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3150</guid>
		<description><![CDATA[One of the things I found out about at Tuesday&#8217;s MSDN Northeast Roadshow stop in Augusta is the first New England GiveCamp, June 11-13 at Microsoft&#8217;s Northeast Research and Development center in Cambridge, MA. I&#8217;m attending, and I&#8217;d urge you to do so. A GiveCamp is basically a gathering of developers, DBAs, project managers, designers [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/04/14/visual-studio-2010-net-4-events-for-maine-based-developers/" rel="bookmark">Visual Studio 2010 / .NET 4 Events For Maine-Based Developers</a> (33.8)</li>
				<li><a href="https://www.dougv.com/2010/05/12/msdn-northeast-roadshow-augusta-me-may-11-2010-recap/" rel="bookmark">MSDN Northeast Roadshow, Augusta, ME, May 11, 2010 Recap</a> (17.1)</li>
				<li><a href="https://www.dougv.com/2010/04/29/live-from-the-microsoft-launch-2010-event-in-boston/" rel="bookmark">Live From The Microsoft Launch 2010 Event In Boston</a> (16.1)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>One of the things I found out about at <a href="http://www.dougv.com/2010/05/12/msdn-northeast-roadshow-augusta-me-may-11-2010-recap/">Tuesday&#8217;s MSDN Northeast Roadshow stop in Augusta</a> is the <a href="http://newenglandgivecamp.org/about/" target="_blank">first New England GiveCamp, June 11-13</a> at <a href="http://microsoftcambridge.com/Default.aspx" target="_blank">Microsoft&#8217;s Northeast Research and Development center</a> in Cambridge, MA.</p>
<p><a href="http://newenglandgivecamp.org/" target="_blank"><img class="alignleft" title="New England GiveCamp" src="http://eventbrite-s3.s3.amazonaws.com/eventlogos/3133703/658584845.png" alt="New England GiveCamp" width="305" height="200" /></a>I&#8217;m attending, and I&#8217;d urge you to do so.</p>
<p>A <a href="http://givecamp.org/" target="_blank">GiveCamp</a> is basically a gathering of developers, DBAs, project managers, designers and other IT folks in a given place, to donate their time and skills to charitable projects.</p>
<p>In the case of the New England GiveCamp, <a href="http://newenglandgivecamp.org/the-people-youd-be-helping/" target="_blank">typical projects</a> include upgrading Access databases, or converting Excel spreadsheets to Access; integrating open-source tools, such as Joomla, Drupal and Django, into existing Web sites; adding various gizmos to and tuning up existing Web sites; and several requests to spruce up the look of various types of collateral.</p>
<p>I believe the biggest mistake you could make in deciding whether to participate is thinking that you don&#8217;t have the kind of skills needed. From what&#8217;s been said at the GiveCamp&#8217;s Web site, there&#8217;s going to be plenty to do, whether you&#8217;re <a href="http://torvalds-family.blogspot.com/" target="_blank">Linus Torvalds</a> or <a href="http://comics.com/reality_check/2000-06-05/" target="_blank">Linus Van Pelt</a>.</p>
<p>I think this goes doubly for graphic designers. Trust me, if you are an artistic person, no matter how little you think of your work, your worst effort is 10 times better than the best design ever produced by a programmer. I am speaking from extensive personal experience here. We&#8217;re the people who gave the Internet <a href="http://bancomicsans.com/main/" target="_blank">Comic Sans</a>, animated GIFs and the &lt;marquee&gt; tag, remember. Please, save us from ourselves.</p>
<p>As the Northeast GiveCamp put it, &#8220;<strong></strong>If you  have the passion, we’ll find a place for you.&#8221;</p>
<blockquote><p>In addition to the technical work on site, there are a myriad other  volunteer opportunities both before and during the event, including  registration, sponsor solicitation, organizing the development teams and  matching them to non-profit organizations, handling logistics for food  and snacks, and others we’ll discover along this journey!</p></blockquote>
<p><span id="more-3150"></span>And, of course, <a href="http://newenglandgivecamp.org/sponsors/" target="_blank">businesses can help, too</a>. The GiveCamp says they&#8217;re not so much interested in money as they are services: Donation of meals and promotional items (mugs / T-shirts) are specifically mentioned.</p>
<p>Microsoft will make sure you get fed during the event. They will also provide crash space in NERD, provided you bring your own sleeping bag / air mattress; and they have showers on site (BYO toiletries). If you don&#8217;t like that idea, NERD is very near the Kendall / MIT MBTA station.</p>
<p>The only specific demands the GiveCamp has are, if you&#8217;re providing technical help to a project, commit to doing the entire weekend; and bring your own laptop (read: any needed software, such as Visual Studio / Dreamweaver, too; how you&#8217;ll tackle the project to which you have been assigned will be determined by a conference call before the event).</p>
<p>If you can&#8217;t commit to the whole weekend, the GiveCamp could still use your help, and will work within your schedule.</p>
<p>I really do hope you consider participating. <a href="http://newenglandgivecamp.eventbrite.com/" target="_blank">Register at the GiveCamp&#8217;s EventBrite page</a>.</p>
<p>Look at it as giving back, or paying forward; either way, you&#8217;ll help people who need the help, and meet people who can help you, in turn.</p>
<p>All links in this post on delicious: <a href="http://delicious.com/dougvdotcom/designers-and-developers-donate-your-time-talent-at-new-england-give-camp-june-11-13-2010" target="_blank">http://delicious.com/dougvdotcom/designers-and-developers-donate-your-time-talent-at-new-england-give-camp-june-11-13-2010</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/04/14/visual-studio-2010-net-4-events-for-maine-based-developers/" rel="bookmark">Visual Studio 2010 / .NET 4 Events For Maine-Based Developers</a> (33.8)</li>
				<li><a href="https://www.dougv.com/2010/05/12/msdn-northeast-roadshow-augusta-me-may-11-2010-recap/" rel="bookmark">MSDN Northeast Roadshow, Augusta, ME, May 11, 2010 Recap</a> (17.1)</li>
				<li><a href="https://www.dougv.com/2010/04/29/live-from-the-microsoft-launch-2010-event-in-boston/" rel="bookmark">Live From The Microsoft Launch 2010 Event In Boston</a> (16.1)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/crowdsourcing/" title="crowdsourcing" rel="tag">crowdsourcing</a>, <a href="https://www.dougv.com/tag/msdn/" title="MSDN" rel="tag">MSDN</a>, <a href="https://www.dougv.com/tag/visual-studio/" title="Visual Studio" rel="tag">Visual Studio</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/05/13/designers-and-developers-donate-your-time-talent-at-new-england-give-camp-june-11-13-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

