<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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" version="2.0">

<channel>
	<title>Kaeli's Space</title>
	
	<link>http://www.kaelisspace.com/wordpress22</link>
	<description>Tips, tricks, and tidbits from a pet-loving computer geek</description>
	<pubDate>Sat, 07 Nov 2009 03:59:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/KaelisSpace" type="application/rss+xml" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">KaelisSpace</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>jquery snippets</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/11/06/jquery-snippets/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/11/06/jquery-snippets/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 03:59:08 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1113</guid>
		<description><![CDATA[Because I&#8217;m a total newb to jquery, but I love it already.


// hide element with ID #liModify
$(&#34;#liModify&#34;).hide();

// show element with ID #fldAttachment
$(&#34;#fldAttachment&#34;).show();

// toggle element wth ID fldModName (show if hidden, hide if visible)
$(&#34;#fldModName&#34;).toggle();

// uncheck a group of checkboxes named chkRequestType[]
// this group allows handling as an array when submitted, a common thing for php
$(&#34;input[name=&#039;chkRequestType[]&#039;]&#34;).attr(&#34;checked&#34;, false);

// [...]]]></description>
			<content:encoded><![CDATA[<p>Because I&#8217;m a total newb to jquery, but I love it already.</p>
<pre name="code" class="javascript">

// hide element with ID #liModify
$(&quot;#liModify&quot;).hide();

// show element with ID #fldAttachment
$(&quot;#fldAttachment&quot;).show();

// toggle element wth ID fldModName (show if hidden, hide if visible)
$(&quot;#fldModName&quot;).toggle();

// uncheck a group of checkboxes named chkRequestType[]
// this group allows handling as an array when submitted, a common thing for php
$(&quot;input[name=&#039;chkRequestType[]&#039;]&quot;).attr(&quot;checked&quot;, false);

// select the first option in a dropdown list with the ID ddlOffice
$(&quot;option:first&quot;, &quot;select#ddlOffice&quot;).attr(&quot;selected&quot;,&quot;selected&quot;);

// remove CSS class from all elements with class .error
$(&quot;.error&quot;).each(function (){ $(this).removeClass(&quot;error&quot;); });

// add a CSS class to the label for an invalid element (form validation)
if ($(&quot;#ddlOffice&quot;).val() == &quot;&quot;) {
isValid = false;
$(&quot;label[for=&#039;ddlOffice&#039;]&quot;).addClass(&quot;error&quot;);
}

// get the ID of the selected radio button of a group named &quot;rbRequestType&quot; that belongs to a form with the ID &quot;theform&quot;
$(&quot;#theform input[name=&#039;rbRequestType&#039;]:checked&quot;).attr(&quot;id&quot;)

// is the box checked?
if($(&quot;#chkRequestTypeModName&quot;).attr(&quot;checked&quot;) == true)

// focus the first element where its label has a class of &quot;error&quot;
var e = $(&quot;.error:first&quot;).attr(&quot;for&quot;);
$(&quot;#&quot; + e).focus();

// most of the code (like the above) will go in the document.ready section, it&#039;s like the onload event for the document
$(document).ready(function() {
// put stuff here
});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/11/06/jquery-snippets/feed/</wfw:commentRss>
		</item>
		<item>
		<title>javascript validation - not empty</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/11/06/javascript-validation-not-empty/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/11/06/javascript-validation-not-empty/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 03:41:50 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[jQuery]]></category>

		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1111</guid>
		<description><![CDATA[For text or textareas


function isEmpty (val){
regex = /^.*\w+.*$/m
return ! regex.test(val)
}

Example use (jquery)
if (isEmpty($(&#8221;#txtRequestorName&#8221;).val())) { // do something  }
]]></description>
			<content:encoded><![CDATA[<p>For text or textareas</p>
<pre name="code" class="javascript">

function isEmpty (val){
regex = /^.*\w+.*$/m
return ! regex.test(val)
}
</pre>
<p>Example use (jquery)</p>
<p>if (isEmpty($(&#8221;#txtRequestorName&#8221;).val())) { // do something  }</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/11/06/javascript-validation-not-empty/feed/</wfw:commentRss>
		</item>
		<item>
		<title>AT&amp;T sues Verizon over ‘there’s a map for that’ ads</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/11/04/att-sues-verizon-over-theres-a-map-for-that-ads/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/11/04/att-sues-verizon-over-theres-a-map-for-that-ads/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 01:35:02 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Bloggerific]]></category>

		<category><![CDATA[In The News]]></category>

		<category><![CDATA[Apple]]></category>

		<category><![CDATA[AT&amp;T]]></category>

		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1106</guid>
		<description><![CDATA[An article over at Engadget talks about AT&#38;T suing Verizon.
A quote in the article got my attention.
&#8220;We also had lower churn &#8212; a sign that customers are quite happy with the service they receive.&#8221;
Dear AT&#38;T: one of the reasons you have low churn, as you call it, is because WE&#8217;RE STUCK WITH YOU. There are [...]]]></description>
			<content:encoded><![CDATA[<p>An <a href="http://www.engadget.com/2009/11/03/atandt-sues-verizon-over-theres-a-map-for-that-ads/">article over at Engadget talks about AT&amp;T suing Verizon</a>.</p>
<p>A quote in the article got my attention.</p>
<blockquote><p>&#8220;We also had lower churn &#8212; a sign that customers are quite happy with the service they receive.&#8221;</p></blockquote>
<p>Dear AT&amp;T: one of the reasons you have low churn, as you call it, is because <strong>WE&#8217;RE STUCK WITH YOU</strong>. There are no other carriers authorized for iPhone (at least in my area) right now. If I had a choice, I&#8217;d drop you in a heartbeat. I get shoddy, slow connections and I lose the 3G all the time. Sometimes, I get no service at all. Usually that happens when I most need it, such as when I&#8217;m lost and need the map.</p>
<p>Even when I CAN get another carrier, I have a contract. Breaking it will cost me. I may decide to do it anyway if this keeps up, especially because Apple is pissing me off by not allowing Flash. My next phone may be the Android. Then I can say a nice big f-you to both AT&amp;T AND Apple.</p>
<p>I am not satisfied with my service. Not at all.</p>
<p>As an aside, <strong>I&#8217;m sick of hearing that Apple is rejecting apps it doesn&#8217;t like</strong>. <a href="http://blogs.magnatune.com/buckman/2009/09/magnatune-on-the-iphone.html">Magnatune is the latest</a>. Fuck you, Apple. One more reason for me to consider an Android for my next phone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/11/04/att-sues-verizon-over-theres-a-map-for-that-ads/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Trace Listeners</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/11/04/trace-listeners/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/11/04/trace-listeners/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 01:22:35 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[C#.NET 2.0]]></category>

		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1102</guid>
		<description><![CDATA[

            Trace.Listeners.Clear();
            Trace.Listeners.Add(new DefaultTraceListener());
            Debug.Print(&#34;Fun with debugging statements&#34;);
            Debug.Indent();
   [...]]]></description>
			<content:encoded><![CDATA[<pre name="code" class="csharp">

            Trace.Listeners.Clear();
            Trace.Listeners.Add(new DefaultTraceListener());
            Debug.Print(&quot;Fun with debugging statements&quot;);
            Debug.Indent();
            for (int i = 0; i &lt; 10; i++)
            {
                Debug.Print(&quot;i = &quot; + i.ToString());
            }
            Debug.Unindent();
            Debug.Print(&quot;All done.&quot;);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/11/04/trace-listeners/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Reading a dataset from an xml node</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/11/04/reading-a-dataset-from-an-xml-node/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/11/04/reading-a-dataset-from-an-xml-node/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 01:18:26 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[snippet]]></category>

		<category><![CDATA[VB.NET 2.0]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1099</guid>
		<description><![CDATA[Imports System.Xml
        xmldoc.LoadXml(xmlString)
        theNode = xmldoc.SelectSingleNode(&#8221;/xpath/query&#8221;)
        myDataSet.ReadXml(New System.Xml.XmlNodeReader(theNode))
]]></description>
			<content:encoded><![CDATA[<p>Imports System.Xml</p>
<p>        xmldoc.LoadXml(xmlString)<br />
        theNode = xmldoc.SelectSingleNode(&#8221;/xpath/query&#8221;)<br />
        myDataSet.ReadXml(New System.Xml.XmlNodeReader(theNode))</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/11/04/reading-a-dataset-from-an-xml-node/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Moar Caturday!</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/09/05/moar-caturday-2/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/09/05/moar-caturday-2/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 13:30:14 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Cats]]></category>

		<category><![CDATA[caturday]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1074</guid>
		<description><![CDATA[IT&#8217;S CATURDAY TIEM!!








]]></description>
			<content:encoded><![CDATA[<p>IT&#8217;S CATURDAY TIEM!!</p>
<p><a href="http://cheezburger.com/view.aspx?ciid=4632064"><img src="http://images.cheezburger.com/completestore/2009/7/6/128914019575504516.jpg" alt="funny pictures" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/07/07/funny-pictures-babysittin/"><img class="mine_4524758" title="funny-pictures-cat-hates-babysitting" src="http://icanhascheezburger.wordpress.com/files/2009/06/funny-pictures-cat-hates-babysitting.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><span id="more-1074"></span><br />
<a href="http://icanhascheezburger.com/2009/06/17/funny-pictures-put-in-the-ew/"><img class="mine_4354189" title="funny-pictures-cat-sees-inside-of-toilet" src="http://icanhascheezburger.wordpress.com/files/2009/06/funny-pictures-cat-sees-inside-of-toilet.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/06/26/funny-pictures-ownly-wun/"><img class="mine_4424250" title="funny-pictures-cat-gives-you-his-only-ball" src="http://icanhascheezburger.wordpress.com/files/2009/06/funny-pictures-cat-gives-you-his-only-ball.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/06/30/funny-pictures-evil-2/"><img class="mine_4329583" title="funny-pictures-kitten-is-evil" src="http://icanhascheezburger.wordpress.com/files/2009/06/funny-pictures-kitten-is-evil.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/07/10/funny-pictures-omg-omg/"><img class="mine_4544341" title="funny-pictures-cat-is-excited-about-ribbons" src="http://icanhascheezburger.wordpress.com/files/2009/06/funny-pictures-cat-is-excited-about-ribbons.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/07/16/funny-pictures-de-giggles/"><img class="mine_4608210" title="funny-pictures-kittens-have-the-giggles" src="http://icanhascheezburger.wordpress.com/files/2009/07/funny-pictures-kittens-have-the-giggles.jpg" alt="funny pictures of cats with captions" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/09/05/moar-caturday-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Woody is thirsty</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/09/03/woody-is-thirsty/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/09/03/woody-is-thirsty/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 03:24:27 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Video]]></category>

		<category><![CDATA[Cats]]></category>

		<category><![CDATA[humor]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1097</guid>
		<description><![CDATA[He has an interesting way of getting a drink.

(via Bits and Pieces)
]]></description>
			<content:encoded><![CDATA[<p>He has an interesting way of getting a drink.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/8KswnjMa-MQ&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/8KswnjMa-MQ&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1"></embed></object></p>
<p>(<a href="http://bitsandpieces.us/">via Bits and Pieces</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/09/03/woody-is-thirsty/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Link Love Time!</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/08/10/link-love-time/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/08/10/link-love-time/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 02:18:32 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[link love]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1068</guid>
		<description><![CDATA[I&#8217;ve been a little busy lately, but I&#8217;m going through all my saved articles slowly but surely and reading up. Hope you enjoy these!
Why “I’d just Google it” is not an acceptable interview answer - Anyone can use a search engine. It&#8217;s not a reason to hire you.
Understanding Garbage Collection in .NET - I can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/linklove.jpg" alt="Link Love" hspace="5" vspace="5" align="left" />I&#8217;ve been a little busy lately, but I&#8217;m going through all my saved articles slowly but surely and reading up. Hope you enjoy these!</p>
<p><a href="http://improvingsoftware.com/2009/05/15/why-id-just-google-it-is-not-an-acceptable-interview-answer/">Why “I’d just Google it” is not an acceptable interview answer </a>- Anyone can use a search engine. It&#8217;s not a reason to hire you.</p>
<p><a href="http://www.simple-talk.com/dotnet/.net-framework/understanding-garbage-collection-in-.net/">Understanding Garbage Collection in .NET</a> - I can&#8217;t emphasize enough how important it is to understand that while garbage collection is a great thing, you are in for some hurting if you think it&#8217;s nothing but magic. I have seen my share of out of memory exceptions from code written by people who didn&#8217;t understand how this garbage collection thing works. Yes, allocating a ton of strings you never use DOES matter. The <strong>Fragmentation Of The Heap</strong> section is vital to understanding out of memory exceptions on systems that appear to have a lot of memory left.</p>
<p><a href="http://www.theenterprisearchitect.eu/archive/2009/06/25/8-reasons-why-model-driven-development-is-dangerous">8 reasons why Model-Driven Development is dangerous</a> - there are many approaches to building an application. It&#8217;s always worth knowing the pros, and cons, of each to decide which is right for your project</p>
<p><a href="http://www.spring.org.uk/2009/07/how-newcomers-can-influence-established-groups.php">How Newcomers Can Influence Established Groups</a> - if you&#8217;ve got a new job, or want to get one, you need to read this. Programmers are people first and programmers second. Learn more people skills and it WILL help your job, no matter what your job is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/08/10/link-love-time/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Global Error Handler - C#.NET example</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/08/03/global-error-handler-cnet-example/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/08/03/global-error-handler-cnet-example/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 01:04:25 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[ASP.NET 2.0]]></category>

		<category><![CDATA[C#.NET 2.0]]></category>

		<category><![CDATA[global.asax]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1092</guid>
		<description><![CDATA[This is the same as the VB.NET global error handler example, but using C#
Global.asax

&#60;%@ Application Language=&#34;C#&#34; %&#62;

&#60;script RunAt=&#34;server&#34;&#62;

    void Application_Start(object sender, EventArgs e)
    {
        // Code that runs on application startup

    }
   
    void Application_End(object sender, EventArgs e)
    {
        //  Code that runs on application shutdown

    }
       
    void Application_Error(object sender, EventArgs e)
    {
        // Code that [...]]]></description>
			<content:encoded><![CDATA[<p>This is the same as the <a href="http://www.kaelisspace.com/wordpress22/2009/08/03/global-error-handler-vbnet-example/">VB.NET global error handler example</a>, but using C#</p>
<p><strong>Global.asax</strong></p>
<pre name="code" class="csharp">
&lt;%@ Application Language=&quot;C#&quot; %&gt;

&lt;script RunAt=&quot;server&quot;&gt;

    void Application_Start(object sender, EventArgs e)
    {
        // Code that runs on application startup

    }
   
    void Application_End(object sender, EventArgs e)
    {
        //  Code that runs on application shutdown

    }
       
    void Application_Error(object sender, EventArgs e)
    {
        // Code that runs when an unhandled error occurs
       
        HttpContext ctx = HttpContext.Current;
        Exception exception = ctx.Server.GetLastError ();
       
        // do not redirect for 404
        if (exception.GetType().FullName == &quot;System.Web.HttpException&quot;)
        {
            HttpException exHttp = (HttpException)exception;
            if (exHttp.GetHttpCode() == 404) throw exHttp;
        }
       
        ctx.Items[&quot;LastError&quot;] = exception;
        ctx.Server.ClearError ();
        ctx.Server.Transfer(&quot;ErrorHandler.aspx&quot;);
       
    }

    void Session_Start(object sender, EventArgs e)
    {
        // Code that runs when a new session is started

    }

    void Session_End(object sender, EventArgs e)
    {
        // Code that runs when a session ends.
        // Note: The Session_End event is raised only when the sessionstate mode
        // is set to InProc in the Web.config file. If session mode is set to StateServer
        // or SQLServer, the event is not raised.

    }
      
&lt;/script&gt;
</pre>
<p><strong>ErrorHandler.aspx</strong></p>
<pre name="code" class="csharp">
&lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;ErrorHandler.aspx.cs&quot; Inherits=&quot;ErrorHandler&quot; %&gt;

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;&lt;a href=&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&lt;/a&gt;&quot;&gt;

&lt;html xmlns=&quot;&lt;a href=&quot;http://www.w3.org/1999/xhtml&quot;&gt;http://www.w3.org/1999/xhtml&lt;/a&gt;&quot; &gt;
&lt;head runat=&quot;server&quot;&gt;
    &lt;title&gt;&lt;%= ConfigurationManager.AppSettings[&quot;ApplicationName&quot;] %&gt; -- Error Page&lt;/title&gt;
    &lt;link href=&quot;ReportsStyle.css&quot; type=&quot;text/css&quot; rel=&quot;Stylesheet&quot; /&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
    &lt;asp:Panel ID=&quot;panel1&quot; runat=&quot;server&quot;&gt;
    &lt;h2&gt;An error occurred.&lt;/h2&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblUserMsg&quot; runat=&quot;server&quot; /&gt;&lt;/p&gt;
    &lt;hr /&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblErrType&quot; runat=&quot;server&quot; Text=&quot;&lt;b&gt;Type:&lt;/b&gt; &quot; /&gt;&lt;/p&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblErrMsg&quot; runat=&quot;server&quot; text=&quot;&lt;b&gt;Message:&lt;/b&gt; &quot; /&gt;&lt;/p&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblErrDetail&quot; runat=&quot;server&quot; text=&quot;&lt;b&gt;Detail:&lt;/b&gt; &quot; /&gt;&lt;/p&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblTrace&quot; runat=&quot;server&quot; Text=&quot;&lt;b&gt;Trace:&lt;/b&gt; &quot; /&gt;&lt;/p&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblErrSrc&quot; runat=&quot;server&quot; Text=&quot;&lt;b&gt;Source:&lt;/b&gt; &quot; /&gt;&lt;/p&gt;
    &lt;/asp:Panel&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Code behind</p>
<pre name="code" class="csharp">
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ErrorHandler : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        /* application_onerror redirects here; if there is any compilation error,
         * you get an infinite loop.
         * SO BE CAREFUL CHANGING THIS PAGE
         */
        Exception lastException, baseException;
        try
        {
            lastException = (Exception)Context.Items[&quot;LastError&quot;];
            string detail = (string)Context.Items[&quot;ErrorDetail&quot;];
            if (lastException != null)
            {
                baseException = lastException.GetBaseException();
                lblErrType.Text += baseException.GetType().ToString();
                lblErrMsg.Text += baseException.Message;
                if (detail != null) lblErrDetail.Text += detail;
                lblTrace.Text += baseException.StackTrace;
                lblErrSrc.Text += baseException.Source;

            }
            else
            {
                lblErrType.Text += &quot;Not available&quot;;
                lblErrMsg.Text += &quot;Not available&quot;;
                lblTrace.Text += &quot;Not available&quot;;
                lblErrSrc.Text += &quot;Not available&quot;;
            }
        }
        catch (Exception exception)
        {
            //mostly this is here in case we did something stupid in that try block up there.
            lblErrMsg.Text = &quot;Error Message: &quot; + exception.Message;
            lblTrace.Text = &quot;Stack Trace: &quot; + exception.StackTrace;
            lblErrSrc.Text = &quot;Error Source: &quot; + exception.Source;
        }
    }
}
</pre>
<p>It has the same caveats I mentioned in the VB post. Precompile it, or you may find yourself in an endless loop.</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/08/03/global-error-handler-cnet-example/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Global Error Handler - VB.NET example</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/08/03/global-error-handler-vbnet-example/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/08/03/global-error-handler-vbnet-example/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 00:58:23 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[ASP.NET 2.0]]></category>

		<category><![CDATA[global.asax]]></category>

		<category><![CDATA[VB.NET 2.0]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1090</guid>
		<description><![CDATA[This little example just catches all unhandled exceptions and forwards them to a page, ErrorHandler.aspx, which then displays things a little prettier.
Global.asax.vb

Imports System.Web.SessionState

Public Class Global_asax
    Inherits System.Web.HttpApplication

    Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        &#039; Fires when the application is started
    End Sub

    Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
        &#039; [...]]]></description>
			<content:encoded><![CDATA[<p>This little example just catches all unhandled exceptions and forwards them to a page, ErrorHandler.aspx, which then displays things a little prettier.</p>
<p><strong>Global.asax.vb</strong></p>
<pre name="code" class="vb">
Imports System.Web.SessionState

Public Class Global_asax
    Inherits System.Web.HttpApplication

    Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        &#039; Fires when the application is started
    End Sub

    Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
        &#039; Fires when the session is started
    End Sub

    Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
        &#039; Fires at the beginning of each request
    End Sub

    Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
        &#039; Fires upon attempting to authenticate the use
    End Sub

    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
        &#039; Fires when an error occurs
        Dim ctx As HttpContext = HttpContext.Current
        Dim oException As Exception = ctx.Server.GetLastError()
        &#039; do not redirect for 404
        If oException.GetType().FullName = &quot;System.Web.HttpException&quot; Then
            Dim exHttp As HttpException = DirectCast(oException, HttpException)
            If exHttp.GetHttpCode() = 404 Then
                Throw exHttp
            End If
        End If

        ctx.Items(&quot;LastError&quot;) = oException
        ctx.Server.ClearError()
        ctx.Server.Transfer(&quot;ErrorHandler.aspx&quot;)

    End Sub

    Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
        &#039; Fires when the session ends
    End Sub

    Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
        &#039; Fires when the application ends
    End Sub

End Class
</pre>
<p>ErrorHandler.aspx</p>
<pre name="code" class="vb">

    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
    &lt;div&gt;
    &lt;asp:Panel ID=&quot;panel1&quot; runat=&quot;server&quot;&gt;
    &lt;h2&gt;An error occurred.&lt;/h2&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblUserMsg&quot; runat=&quot;server&quot; /&gt;&lt;/p&gt;
    &lt;hr /&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblErrType&quot; runat=&quot;server&quot; Text=&quot;&lt;b&gt;Type:&lt;/b&gt; &quot; /&gt;&lt;/p&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblErrMsg&quot; runat=&quot;server&quot; text=&quot;&lt;b&gt;Message:&lt;/b&gt; &quot; /&gt;&lt;/p&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblErrDetail&quot; runat=&quot;server&quot; text=&quot;&lt;b&gt;Detail:&lt;/b&gt; &quot; /&gt;&lt;/p&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblTrace&quot; runat=&quot;server&quot; Text=&quot;&lt;b&gt;Trace:&lt;/b&gt; &quot; /&gt;&lt;/p&gt;
    &lt;p&gt;&lt;asp:Label ID=&quot;lblErrSrc&quot; runat=&quot;server&quot; Text=&quot;&lt;b&gt;Source:&lt;/b&gt; &quot; /&gt;&lt;/p&gt;
    &lt;/asp:Panel&gt;
    &lt;/div&gt;
    &lt;/form&gt;
</pre>
<p>ErrorHandler.aspx.vb</p>
<pre name="code" class="vb">

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        &#039; application_onerror redirects here; if there is any compilation error,
        &#039; you get an infinite loop.
        &#039; SO BE CAREFUL CHANGING THIS PAGE
        &#039;
        Dim lastException, baseException As Exception
        Try
            lastException = DirectCast(Context.Items(&quot;LastError&quot;), Exception)

            Dim detail As String = DirectCast(Context.Items(&quot;ErrorDetail&quot;), String)
            If Not lastException Is Nothing Then
                baseException = lastException.GetBaseException()
                lblErrType.Text += baseException.GetType().ToString()
                lblErrMsg.Text += baseException.Message
                If Not String.IsNullOrEmpty(detail) Then
                    lblErrDetail.Text += detail
                End If
                lblTrace.Text += baseException.StackTrace
                lblErrSrc.Text += baseException.Source
            Else
                lblErrType.Text += &quot;Not available&quot;
                lblErrMsg.Text += &quot;Not available&quot;
                lblTrace.Text += &quot;Not available&quot;
                lblErrSrc.Text += &quot;Not available&quot;
            End If
        Catch oException As Exception
            &#039;mostly this is here in case we did something stupid in that try block up there.
            lblErrMsg.Text = &quot;Error Message: &quot; + oException.Message
            lblTrace.Text = &quot;Stack Trace: &quot; + oException.StackTrace
            lblErrSrc.Text = &quot;Error Source: &quot; + oException.Source
        End Try

    End Sub
</pre>
<p>Note that this would catch all exceptions, including compile errors, so be sure to precompile before deploying! If you don&#8217;t, and there&#8217;s a compile error on the error page itself, you have fun with an endless loop. </p>
<p>For more information, see <a title="MSDN: How to handle application-level errors" href="http://msdn.microsoft.com/en-us/library/24395wz3.aspx">How to: Handle Application-Level Errors</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/08/03/global-error-handler-vbnet-example/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Thank you, Netflix!</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/08/03/thank-you-netflix/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/08/03/thank-you-netflix/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 00:32:05 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Bloggerific]]></category>

		<category><![CDATA[netflix]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1088</guid>
		<description><![CDATA[I do try to stay up to date with things, but somehow I missed this one. Netflix finally lets you watch the streaming movies in Firefox! It requires Silverlight, but I can live with that.
Every so often I would click the little Watch Instantly to see if it let me finally watch the movies, and [...]]]></description>
			<content:encoded><![CDATA[<p>I do try to stay up to date with things, but somehow I missed this one. Netflix finally lets you watch the streaming movies in Firefox! It requires Silverlight, but I can live with that.</p>
<p>Every so often I would click the little Watch Instantly to see if it let me finally watch the movies, and today, it did  =)</p>
<p>So, thank you Netflix!</p>
<p>Of course, now I can waste even more time staring at pretty moving pictures, but hey.  =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/08/03/thank-you-netflix/feed/</wfw:commentRss>
		</item>
		<item>
		<title>No iPhone for you</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/07/28/no-iphone-for-you/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/07/28/no-iphone-for-you/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 03:18:20 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Bloggerific]]></category>

		<category><![CDATA[In The News]]></category>

		<category><![CDATA[Apple]]></category>

		<category><![CDATA[AT&amp;T]]></category>

		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1086</guid>
		<description><![CDATA[This was an interesting rant from LifeHacker.
Bad Apple: An Argument Against Buying an iPhone
I have an iPhone, and it does piss me off that Apple tells me which apps it feels are suitable for me. Think about it &#8212; what if Microsoft got to tell you which applications you could install on your computer? Do [...]]]></description>
			<content:encoded><![CDATA[<p>This was an interesting rant from LifeHacker.</p>
<blockquote><p><a href="http://lifehacker.com/5324724/bad-apple-an-argument-against-buying-an-iphone">Bad Apple: An Argument Against Buying an iPhone</a></p></blockquote>
<p>I have an iPhone, and it <strong>does </strong>piss me off that Apple tells me which apps it feels are suitable for me. Think about it &#8212; what if Microsoft got to tell you which applications you could install on your computer? Do you think that would fly? Why is this even being allowed? <strong>Why aren&#8217;t more people complaining? </strong></p>
<p>I was thinking of upgrading to the new iPhone, but now I&#8217;m not so sure I want to. This idea of someone else telling me what I can install on my own <span style="text-decoration: line-through;">computer </span>phone isn&#8217;t sitting so well with me. Unlike some of the commenters over at LifeHacker, I DO want a little computer in my pocket. And I want it to be MINE, with whatever I deem fit to put on it.</p>
<p>Keep going this route, AT&amp;T and Apple, and I&#8217;ll be forced to tell you both to suck it. Long and hard. I&#8217;m sure I won&#8217;t be alone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/07/28/no-iphone-for-you/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Simon’s Cat - new video</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/07/26/simons-cat-new-video/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/07/26/simons-cat-new-video/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 02:12:32 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Cats]]></category>

		<category><![CDATA[simon's cat]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1084</guid>
		<description><![CDATA[You can&#8217;t love cats and NOT love Simon&#8217;s Cat  =)

]]></description>
			<content:encoded><![CDATA[<p>You can&#8217;t love cats and NOT love Simon&#8217;s Cat  =)</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/I1qHVVbYG8Y&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/I1qHVVbYG8Y&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/07/26/simons-cat-new-video/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows Live SkyDrive</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/07/13/windows-live-skydrive/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/07/13/windows-live-skydrive/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 00:31:03 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Newbie Geek]]></category>

		<category><![CDATA[online storage]]></category>

		<category><![CDATA[skydrive]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1079</guid>
		<description><![CDATA[This looks like an interesting service &#8212; Windows Live SkyDrive. As of this post, they&#8217;re offering 25GB free storage. Not too shabby. I&#8217;ve been playing with it, and it&#8217;s pretty easy to use. I&#8217;d like to see it support uploading folder trees, but for a free service with that much space, it&#8217;s a nice place [...]]]></description>
			<content:encoded><![CDATA[<p><a title="SkyDrive online storage" href="http://skydrive.live.com"><img title="skydrive" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/07/skydrive.jpg" border="0" alt="skydrive" hspace="5" vspace="5" width="285" height="200" align="left" /></a>This looks like an interesting service &#8212; <a title="SkyDrive online storage" href="http://skydrive.live.com">Windows Live SkyDrive</a>. As of this post, they&#8217;re offering <strong>25GB free storage</strong>. Not too shabby. I&#8217;ve been playing with it, and it&#8217;s pretty easy to use. I&#8217;d like to see it support uploading folder trees, but for a free service with that much space, it&#8217;s a nice place to backup simple stuff and share documents. Note there is a 50MB size limit on individual files as well.</p>
<p>I won&#8217;t use it as a primary backup because I have more than 25GB of data and many files larger than 50MB, plus uploading that much takes a long time. It won&#8217;t replace an external drive for real backups. But for simple backups and just sharing files with my friends, it looks promising!</p>
<p>I don&#8217;t know too much about online storage &#8212; I was looking for a removable drive so I can re-image my PC. I looked around the &#8216;net briefly but I didn&#8217;t see any comparable services with so much space for free that support drag and drop of files to make it easy to upload. If you know of any, I&#8217;d love to hear about them in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/07/13/windows-live-skydrive/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Where cats sleep</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/07/07/where-cats-sleep/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/07/07/where-cats-sleep/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 04:31:57 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[It's teh funnay]]></category>

		<category><![CDATA[humor]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1077</guid>
		<description><![CDATA[
see more Funny Graphs
]]></description>
			<content:encoded><![CDATA[<p><a href="http://graphjam.com/2009/07/07/song-chart-memes-cats-sleep/"><img class="mine_4592942" title="song-chart-memes-cats-sleep" src="http://graphjam.wordpress.com/files/2009/07/song-chart-memes-cats-sleep.jpg" alt="song chart memes" width="504" height="252" /></a><br />
see more <a href="http://graphjam.com">Funny Graphs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/07/07/where-cats-sleep/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Holy Caturday, Batman!</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/07/04/holy-caturday-batman/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/07/04/holy-caturday-batman/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 03:14:43 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Cats]]></category>

		<category><![CDATA[caturday]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1037</guid>
		<description><![CDATA[HAPPY CATURDAY! AND HAPPY INDEPENDENCE DAY TO MY FELLOWS FROM THE STATES!







]]></description>
			<content:encoded><![CDATA[<h3>HAPPY CATURDAY! AND HAPPY INDEPENDENCE DAY TO MY FELLOWS FROM THE STATES!</h3>
<p><a href="http://icanhascheezburger.com/2009/05/17/funny-pictures-this-is-important/"><img class="mine_3047414" title="funny-pictures-cat-assumes-this-is-important" src="http://icanhascheezburger.wordpress.com/files/2009/05/funny-pictures-cat-assumes-this-is-important.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><a href="http://www.stuffonmycat.com/Clothes-On-My-Cat/20090511-slinky.html"><img src="http://www.stuffonmycat.com/images/stories/20090511_slinky.jpg" alt="" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/05/22/funny-pictures-with-happyness/"><img class="mine_4099058" title="funny-pictures-cat-is-so-happy" src="http://icanhascheezburger.wordpress.com/files/2009/05/funny-pictures-cat-is-so-happy.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/05/24/funny-pictures-doom-2/"><img class="mine_4117550" title="funny-pictures-doom-comes-in-fun-size" src="http://icanhascheezburger.wordpress.com/files/2009/05/funny-pictures-doom-comes-in-fun-size.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/06/10/funny-pictures-this-2/"><img class="mine_4255592" title="funny-pictures-you-have-a-very-dangerous-box" src="http://icanhascheezburger.wordpress.com/files/2009/05/funny-pictures-you-have-a-very-dangerous-box.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/06/14/funny-pictures-intimidation-2/"><img class="mine_4295250" title="funny-pictures-cat-is-intimidating" src="http://icanhascheezburger.wordpress.com/files/2009/05/funny-pictures-cat-is-intimidating.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/06/15/funny-pictures-room-to-sit-up-here/"><img class="mine_4282948" title="funny-pictures-cat-climbs-very-high" src="http://icanhascheezburger.wordpress.com/files/2009/05/funny-pictures-cat-climbs-very-high.jpg" alt="funny pictures of cats with captions" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/07/04/holy-caturday-batman/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Petland Class Action Lawsuit in the works</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/06/29/petland-class-action-lawsuit-in-the-works/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/06/29/petland-class-action-lawsuit-in-the-works/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 01:34:49 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Dogs]]></category>

		<category><![CDATA[PetLand]]></category>

		<category><![CDATA[puppy mills]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1070</guid>
		<description><![CDATA[I usually hear about these things sooner, but this is the first I recall hearing about it. Link found on a pet group I belong to.
Hundreds of Heartbroken Puppy Buyers Seek To Join Petland Class Action Lawsuit
I don&#8217;t normally link to the HSUS site these days, as I&#8217;ve heard a lot of garbage about them [...]]]></description>
			<content:encoded><![CDATA[<p>I usually hear about these things sooner, but this is the first I recall hearing about it. Link found on a pet group I belong to.</p>
<p><a href="http://www.hsus.org/pets/pets_related_news_and_events/puppy_buyers_petland_lawsuit_032309.html">Hundreds of Heartbroken Puppy Buyers Seek To Join Petland Class Action Lawsuit</a></p>
<p>I don&#8217;t normally link to the HSUS site these days, as I&#8217;ve heard a lot of garbage about them being in bed with PETA, but I can&#8217;t help but be on board with informing people where those poor puppies come from.</p>
<p><strong>Please join us in boycotting PetLand stores.</strong> Frankly, I don&#8217;t think we&#8217;ll ever eliminate commerical breeders, but there has to be a better way to <a href="http://www.kaelisspace.com/wordpress22/2008/10/11/pa-gets-new-puppy-mill-law/">regulate the commercial breeding industry</a>, and consumers should NOT be lied to about where their animals come from.</p>
<p>When purchasing an animal, remember that when it comes to commercial breeders, <a href="http://www.aspca.org/fight-animal-cruelty/puppy-mills/puppy-mill-faq.html#purebred">AKC papers don&#8217;t mean anything</a>. A kennel name on a certificate doesn&#8217;t mean anything about the nature of the kennel. Commercial breeders have kennel names, and they register their dogs by sending in a piece of paper to the AKC. NO ONE AT THE AKC EVER SEES THOSE DOGS. If you want good, healthy puppies, you need to get them from a reputable breeder, not the local PetLand.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/06/29/petland-class-action-lawsuit-in-the-works/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Free kitties through June from ASPCA</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/06/08/free-kitties-through-june-from-aspca/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/06/08/free-kitties-through-june-from-aspca/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 00:39:22 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Cats]]></category>

		<category><![CDATA[rescue]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1064</guid>
		<description><![CDATA[Jeffrey* checking out the shelf. With an audience&#8230;

Speaking of shelter cats, I came across this link from an online community I belong to.
Find Your Purr-fect Match—Cats Over Three Are Free! 
&#8220;To help promote the adoption of our older feline residents, the ASPCA is offering adopters the chance to bring home a cat, three years or [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;">Jeffrey* checking out the shelf. With an audience&#8230;<br />
<img class="aligncenter" title="Jeffrey" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/06/100_1814_small.jpg" alt="" width="500" height="333" /></p>
<p>Speaking of <a href="http://www.kaelisspace.com/wordpress22/2009/06/07/arnold-schwarznegger-apparently-hates-cats/">shelter cats</a>, I came across this link from an online community I belong to.</p>
<blockquote><p><a href="http://www.aspca.org/adoption/adopt-a-shelter-cat-month/free-over-three.html">Find Your Purr-fect Match—Cats Over Three Are Free! </a><br />
&#8220;To help promote the adoption of our older feline residents, the ASPCA is offering adopters the chance to bring home a cat, three years or older, for free!&#8221;</p></blockquote>
<p>The post indicated this was a shelter in New York City, but other shelters may be offering similar programs and the linked article doesn&#8217;t give a specific location. Please help save a life &#8212; adopt a shelter kitty! <strong>June is Adopt-A-Shelter-Cat Month</strong>. Pass the word around please!</p>
<p><em>*The cat pictured above is my Jeffrey. I adopted him as an adult from a local rescue. The eyes in the background are Louie, also adopted as an adult, and Isis, adopted as a feral kitten.<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/06/08/free-kitties-through-june-from-aspca/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Arnold Schwarznegger apparently hates cats</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/06/07/arnold-schwarznegger-apparently-hates-cats/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/06/07/arnold-schwarznegger-apparently-hates-cats/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 02:43:52 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[In The News]]></category>

		<category><![CDATA[Animal Advocacy]]></category>

		<category><![CDATA[Cats]]></category>

		<category><![CDATA[rescue]]></category>

		<category><![CDATA[Schwarznegger]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1062</guid>
		<description><![CDATA[I can&#8217;t think of any other reason a man would want to give owners only 3 days to find their lost cat before they&#8217;re killed by the local pound. If I lived in CA, I&#8217;d be throwing a less-than-mild fit about this latest bullshit.
CA Governor Wants to Cut 3 Days off Shelter Cats&#8217; Reprieve from [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#8217;t think of any other reason a man would want to give owners only 3 days to find their lost cat before they&#8217;re killed by the local pound. If I lived in CA, I&#8217;d be throwing a less-than-mild fit about this latest bullshit.</p>
<p><a href="http://cats.about.com/b/2009/06/07/ca-governor-wants-to-cut-3-days-off-shelter-cats-reprieve-from-death.htm">CA Governor Wants to Cut 3 Days off Shelter Cats&#8217; Reprieve from Death</a></p>
<p>From six days down to three days. THREE DAYS?! Shame on you, Arnie. Heartless, reprehensible, and irresponsible. Why do you hate animals, Mr Schwarznegger? Why are you so anxious to see them murdered instead of returned to their families or placed in loving homes?</p>
<p>I&#8217;m not unreasonable &#8212; I know we can&#8217;t save them all. But to only give them three days is terrifying to me as a pet lover. I can just see a family going on vacation only to come home and find their cat escaped or was let out by accident, and the local pound killed him while they were away. I see my Mom&#8217;s newly adopted kitty (the awesome Willow, who is just a riot and sweet as pie), who was at the local shelter for a month. My parents just adore that cat, but had Willow lived in CA, she&#8217;d be dead instead of in a loving home. It can be hard to find the right home for adult cats, but she and my folks are a perfect match. It took a <strong>month </strong>to find that perfect match. Thirty days, not three.</p>
<p>Shame on you, Mr Schwarznegger. I hope you won&#8217;t be back.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/06/07/arnold-schwarznegger-apparently-hates-cats/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Link Love</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/06/07/link-love-7/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/06/07/link-love-7/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 11:48:28 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[link love]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1047</guid>
		<description><![CDATA[
It&#8217;s time for a little LINK LOVE&#8230;posted in the order I read them  =)
Friends Don’t Let Friends catch (Exception) - I&#8217;m guilty of either not handling any exceptions or catching Exception when I post examples. This is why production code should NOT do what examples show. Catch what you can handle, and bubble the rest [...]]]></description>
			<content:encoded><![CDATA[<p><img title="linklove" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/linklove.jpg" alt="Link Love" hspace="5" vspace="5" width="150" height="100" align="left" /><br />
It&#8217;s time for a little <strong>LINK LOVE</strong>&#8230;posted in the order I read them  =)</p>
<p><a href="http://leedumond.com/blog/friends-dont-let-friends-catch-exception/">Friends Don’t Let Friends catch (Exception)</a> - I&#8217;m guilty of either not handling any exceptions or catching Exception when I post examples. This is why <strong>production </strong>code should NOT do what examples show. Catch what you can handle, and bubble the rest to the main handler.</p>
<p><a href="http://dotnet.dzone.com/news/why-are-you-asking-me-question">Why Are You Asking Me This Question? </a>- If you want to give the right answer, you need to get them to ask the right question.</p>
<p><a href="http://chandoo.org/wp/2009/05/26/excel-2007-productivity-tips/">Do you know these Excel 2007 Productivity Secrets (Hint: Coffee is not one of them)</a> - More help with how to do things in Excel 2007. So THAT&#8217;S what those little boxes do&#8230;</p>
<p><a href="http://www.allthingsworkplace.com/2009/06/we-all-need-help-managers-delegate-its-really-about-help-team-members-collaborate-and-it-would-be-great-if-our-kids-woul.html">Help and How to Ask For It </a>- An interesting post from All Things Workplace, it applies to life in general as well as work</p>
<p><a href="http://www.secretgeek.net/program_communicate_4reasons.asp">The Better You Program, The Worse You Communicate (4 reasons why)</a> - I don&#8217;t know if I agree with this hypothesis, since I&#8217;ve met great coders who communicate well and terrible coders who communicate terribly. I DO agree that programmers should be able to communicate with the less technically savvy folks they&#8217;re writing that code FOR.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/06/07/link-love-7/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using SqlCommand to populate Label text</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/05/19/using-sqlcommand-to-populate-label-text/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/05/19/using-sqlcommand-to-populate-label-text/#comments</comments>
		<pubDate>Tue, 19 May 2009 17:03:09 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[SqlCommand]]></category>

		<category><![CDATA[SqlConnection]]></category>

		<category><![CDATA[SqlDataReader]]></category>

		<category><![CDATA[VB.NET 2.0]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1040</guid>
		<description><![CDATA[Sometimes SqlDataSource doesn&#8217;t work for what you want to do. It&#8217;s a great control, but as I&#8217;ve mentioned before, it can interfere with your plans because of the page lifecycle. You should also know how to run queries and get the results using the ADO.NET classes from System.Data namespace.
The following example shows you how to [...]]]></description>
			<content:encoded><![CDATA[<p><img title="vb.net" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2008/04/vbnet.jpg" alt="" hspace="5" vspace="5" align="left" />Sometimes SqlDataSource doesn&#8217;t work for what you want to do. It&#8217;s a great control, but <a href="http://www.kaelisspace.com/wordpress22/2008/09/19/cnet-getting-query-results-with-sqldataadapter/">as I&#8217;ve mentioned before</a>, it can interfere with your plans because of the page lifecycle. You should also know how to run queries and get the results using the <a href="http://msdn.microsoft.com/en-us/library/system.data(VS.80).aspx">ADO.NET classes from System.Data</a> namespace.</p>
<p>The following example shows you how to set up a simple ASPX page with a <a href="http://msdn.microsoft.com/en-us/library/system.data(VS.80).aspx">GridView</a>. The GridView (bound with an easy SqlDataSource) grabs the employees from AdventureWorks. When you select a row, the manager&#8217;s details will show up in the Label controls. We make use of the <strong>DataKeyNames </strong>collection to make grabbing the ManagerID easier in the <strong>SelectedIndexChanged </strong>event. We use the ManagerID as a parameter to the query, then use <strong>SqlDataReader </strong>to read the results and populate the Label Text.</p>
<div class="note">This example uses AdventureWorks, with <a href="http://www.kaelisspace.com/wordpress22/2009/05/10/northwind-vs-adventureworks/">schemas removed</a>.</div>
<p>On to the code.</p>
<p><strong>ASPX</strong></p>
<pre name="code" class="html">
&lt;%@ Page Language=&quot;VB&quot; AutoEventWireup=&quot;false&quot; CodeFile=&quot;Default4.aspx.vb&quot; Inherits=&quot;Default4&quot; %&gt;

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;&lt;a href=&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&lt;/a&gt;&quot;&gt;

&lt;html xmlns=&quot;&lt;a href=&quot;http://www.w3.org/1999/xhtml&quot;&gt;http://www.w3.org/1999/xhtml&lt;/a&gt;&quot; &gt;
&lt;head runat=&quot;server&quot;&gt;
    &lt;title&gt;Untitled Page&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
            &lt;asp:SqlDataSource ID=&quot;sqldsEmployees&quot; runat=&quot;server&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:AdventureWorksConnectionString %&gt;&quot;
            SelectCommand=&quot;SELECT Employee.EmployeeID, Employee.ManagerID, Employee.Title, Contact.FirstName, Contact.LastName FROM Employee INNER JOIN Contact ON Employee.ContactID = Contact.ContactID&quot;&gt;
        &lt;/asp:SqlDataSource&gt;
               &lt;div style=&quot;z-index: 101; left: 17px; width: 370px; position: absolute; top: 83px;
            height: 355px&quot;&gt;
            &lt;asp:GridView ID=&quot;gvEmployees&quot; runat=&quot;server&quot; AllowPaging=&quot;True&quot; AllowSorting=&quot;True&quot;
                AutoGenerateColumns=&quot;False&quot; AutoGenerateSelectButton=&quot;True&quot; Caption=&quot;Employee List&quot;
                CellPadding=&quot;4&quot; DataKeyNames=&quot;EmployeeID,ManagerID&quot; DataSourceID=&quot;sqldsEmployees&quot; ForeColor=&quot;#333333&quot;
                GridLines=&quot;None&quot; Width=&quot;461px&quot;&gt;
                &lt;FooterStyle BackColor=&quot;#5D7B9D&quot; Font-Bold=&quot;True&quot; ForeColor=&quot;White&quot; /&gt;
                &lt;RowStyle BackColor=&quot;#F7F6F3&quot; ForeColor=&quot;#333333&quot; /&gt;
                &lt;Columns&gt;
                    &lt;asp:BoundField DataField=&quot;EmployeeID&quot; HeaderText=&quot;EmployeeID&quot; InsertVisible=&quot;False&quot;
                        ReadOnly=&quot;True&quot; SortExpression=&quot;EmployeeID&quot; Visible=&quot;False&quot; /&gt;
                    &lt;asp:BoundField DataField=&quot;ManagerID&quot; HeaderText=&quot;ManagerID&quot; SortExpression=&quot;ManagerID&quot; /&gt;
                    &lt;asp:BoundField DataField=&quot;Title&quot; HeaderText=&quot;Title&quot; SortExpression=&quot;Title&quot; /&gt;
                    &lt;asp:BoundField DataField=&quot;FirstName&quot; HeaderText=&quot;FirstName&quot; SortExpression=&quot;FirstName&quot; /&gt;
                    &lt;asp:BoundField DataField=&quot;LastName&quot; HeaderText=&quot;LastName&quot; SortExpression=&quot;LastName&quot; /&gt;
                &lt;/Columns&gt;
                &lt;PagerStyle BackColor=&quot;#284775&quot; ForeColor=&quot;White&quot; HorizontalAlign=&quot;Center&quot; /&gt;
                &lt;SelectedRowStyle BackColor=&quot;#E2DED6&quot; Font-Bold=&quot;True&quot; ForeColor=&quot;#333333&quot; /&gt;
                &lt;HeaderStyle BackColor=&quot;#5D7B9D&quot; Font-Bold=&quot;True&quot; ForeColor=&quot;White&quot; /&gt;
                &lt;EditRowStyle BackColor=&quot;#999999&quot; /&gt;
                &lt;AlternatingRowStyle BackColor=&quot;White&quot; ForeColor=&quot;#284775&quot; /&gt;
            &lt;/asp:GridView&gt;
        &lt;/div&gt;
        &lt;div style=&quot;z-index: 102; left: 502px; width: 310px; position: absolute; top: 85px;
            height: 364px&quot;&gt;
            &lt;h3&gt;Manager Info&lt;/h3&gt;
            Title:
            &lt;asp:Label ID=&quot;lblManagerTitle&quot; runat=&quot;server&quot;&gt;&lt;/asp:Label&gt;&lt;br /&gt;
            Name:
            &lt;asp:Label ID=&quot;lblManagerName&quot; runat=&quot;server&quot;&gt;&lt;/asp:Label&gt;&lt;br /&gt;
            E-mail:
            &lt;asp:Label ID=&quot;lblManagerEmail&quot; runat=&quot;server&quot;&gt;&lt;/asp:Label&gt;&lt;br /&gt;
            Phone:
            &lt;asp:Label ID=&quot;lblManagerPhone&quot; runat=&quot;server&quot;&gt;&lt;/asp:Label&gt;&lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><strong>Code Behind</strong></p>
<pre name="code" class="vb">
Imports System.Collections.Specialized
Imports System.Data.Sql
Imports System.Data.SqlClient
Partial Class Default4
    Inherits System.Web.UI.Page

    &#039; use the SelectedIndexChanged event, not RowCommand, because the properties for the selected row aren&#039;t populated yet in row command
    Protected Sub gvEmployees_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles gvEmployees.SelectedIndexChanged
        Dim managerID As New Integer
        &#039; we can get the manager ID because we set it in the GridView&#039;s DataKeys collection as the second one
        Dim selectedManger As Object = Me.gvEmployees.SelectedDataKey.Values(&quot;ManagerID&quot;)
        If Not selectedManger Is Nothing Then
            managerID = CType(selectedManger, Integer)
            Dim oSqlDataReader As SqlDataReader = Nothing
            Try
                Using oSqlConnection As New SqlConnection
                    oSqlConnection.ConnectionString = ConfigurationManager.ConnectionStrings(&quot;AdventureWorksConnectionString&quot;).ConnectionString
                    Using oSqlCommand As New SqlCommand
                        oSqlCommand.Connection = oSqlConnection
                        oSqlCommand.CommandText = &quot;SELECT Employee.Title, Contact.FirstName, Contact.LastName, Contact.EmailAddress, Contact.Phone FROM Employee INNER JOIN Contact ON Employee.ContactID = Contact.ContactID WHERE &lt;a href=&quot;mailto:EmployeeID=@EmployeeID&quot;&gt;EmployeeID=@EmployeeID&lt;/a&gt;&quot;
                        oSqlCommand.CommandType = Data.CommandType.Text
                        oSqlCommand.Parameters.Clear()
                        oSqlCommand.Parameters.AddWithValue(&quot;@EmployeeID&quot;, managerID)
                        oSqlConnection.Open()
                        oSqlDataReader = oSqlCommand.ExecuteReader(Data.CommandBehavior.CloseConnection)
                        While oSqlDataReader.Read()
                            &#039; there should only be one match
                            Me.lblManagerTitle.Text = oSqlDataReader(&quot;Title&quot;)
                            Me.lblManagerName.Text = oSqlDataReader(&quot;FirstName&quot;) &amp; &quot; &quot; &amp; oSqlDataReader(&quot;LastName&quot;)
                            Me.lblManagerEmail.Text = oSqlDataReader(&quot;EmailAddress&quot;)
                            Me.lblManagerPhone.Text = oSqlDataReader(&quot;Phone&quot;)
                        End While
                    End Using
                End Using
            Finally
                If Not oSqlDataReader Is Nothing AndAlso Not oSqlDataReader.IsClosed Then
                    oSqlDataReader.Close()
                End If
            End Try
        End If
    End Sub
End Class
</pre>
<p><strong>Did this article help you? Please share it on Digg, DZone, or your favorite social network site! As always, I appreciate comments, they let me know if people like what I&#8217;m posting. Thanks!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/05/19/using-sqlcommand-to-populate-label-text/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Link Love</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/05/17/link-love-6/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/05/17/link-love-6/#comments</comments>
		<pubDate>Sun, 17 May 2009 14:22:10 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[link love]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1007</guid>
		<description><![CDATA[Listed basically in the order I thought to put them here. Here&#8217;s what I&#8217;ve been reading lately&#8230;
px - em - % - pt - keyword - informative post from CSS Tricks about font sizes. Loved the explanation on em!
How To Lock Your Computer With USB Drive - i haven&#8217;t tried this yet, but it sounds [...]]]></description>
			<content:encoded><![CDATA[<p>Listed basically in the order I thought to put them here. Here&#8217;s what I&#8217;ve been reading lately&#8230;</p>
<p><a href="http://css-tricks.com/css-font-size/">px - em - % - pt - keyword</a> - informative post from CSS Tricks about font sizes. Loved the explanation on em!</p>
<p><a href="http://lionjkt.wordpress.com/2008/12/31/how-to-lock-your-computer-with-usb-drive/">How To Lock Your Computer With USB Drive</a> - i haven&#8217;t tried this yet, but it sounds like a seriously neat trick. You&#8217;re in trouble if you lose your flash drive, though.</p>
<p><a href="http://www.alistapart.com/articles/sprites">CSS Sprites: Image Slicing’s Kiss of Death</a> - Older article, but if you don&#8217;t know about CSS sprites, or need to brush up, it&#8217;s a great read</p>
<p><a href="http://blogs.msdn.com/ericlippert/archive/2009/04/27/the-stack-is-an-implementation-detail.aspx">The Stack Is An Implementation Detail </a>- Microsoft blogger talks about value types vs reference types (C#.NET)</p>
<p><a href="http://asserttrue.blogspot.com/2009/05/if-i-could-ask-only-one-job-interview.html">If I could ask only one job interview question</a> - I agree with the spirit of this post so much, I can&#8217;t express it. A must read for new and junior developers, especially considering the questions I see asked on forums time and time again&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/05/17/link-love-6/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Northwind vs AdventureWorks</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/05/10/northwind-vs-adventureworks/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/05/10/northwind-vs-adventureworks/#comments</comments>
		<pubDate>Mon, 11 May 2009 03:14:30 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Adventureworks]]></category>

		<category><![CDATA[SQL Server]]></category>

		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1033</guid>
		<description><![CDATA[You might have noticed most of my examples that query a database go against Northwind. Northwind was an older database sample that came with SqlServer 2000, but you can still download and attach it for Sql Server 2005 (I use Express here at home and it works fine).
The reason I haven&#8217;t been using AdventureWorks, which [...]]]></description>
			<content:encoded><![CDATA[<p>You might have noticed most of my examples that query a database go against <strong>Northwind</strong>. Northwind was an older database sample that came with SqlServer 2000, but <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&amp;displaylang=en">you can still download and attach it</a> for Sql Server 2005 (I use Express here at home and it works fine).</p>
<p>The reason I haven&#8217;t been using <strong>AdventureWorks</strong>, which comes with 2005, is that it uses a new feature called <a href="http://msdn.microsoft.com/en-us/library/ms190387.aspx">Schemas</a>. That&#8217;s the &#8220;Person&#8221; part of &#8220;Person.Address&#8221; and the like. Unfortunately, <strong>Visual Studio 2005 features such as the Configure Data Source wizard do not understand schemas</strong>, so any query you try, you end up having to hand-modify to include the schema. If you don&#8217;t, you get a fun &#8220;invalid object name&#8221; error.</p>
<p><a href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=111150">This is a known bug in Visual Studio and they are NOT going to fix it for this release.</a></p>
<p>So, rather than have to modify every query I write or construct views and tables for the default schema, I simply chose Northwind for my examples. I&#8217;m writing example code, not trying to be a DBA, so mucking with the database isn&#8217;t my idea of a good time.</p>
<p>However, I finally got around to researching this issue (read: pissed off at the damn thing), and I found that you can <a href="http://msdn.microsoft.com/en-us/library/ms173423.aspx">remove the schema</a> and assign the tables and views back to the default, dbo. When you do that, Studio will be able to talk to it again.</p>
<p>You can either change it manually using the Properties, or use SQL statements such as</p>
<blockquote><p>alter schema dbo transfer HumanResources.Department</p></blockquote>
<p>If you run into tables that won&#8217;t let you modify the schema, such as the Person.CountryRegion, and instead tell you that you can&#8217;t transfer a schema bound object, go find the view vStateProvinceCountryRegion, click Design, and in the properties, change the option where it says &#8220;bind to schema&#8221; to NO and let it drop the index on the view. Repeat for any others that give you a hard time.</p>
<p>I went through every table and view in the database and got it back to being owned by dbo, and now my SqlDataSource and other controls can query/preview the data and I don&#8217;t hit my head against the wall repeatedly.</p>
<p><strong>Remember, I&#8217;m going through all this because it&#8217;s A TEST DATABASE and I want my test queries to run smoothly. Do NOT do this to a production database!</strong></p>
<p>Once you&#8217;ve assigned them all to dbo (took me about 30 minutes to get it all), you can use AdventureWorks for simple test queries just like Northwind.</p>
<p><strong>Did this post help you? Please share it on Digg, <a href="http://www.dzone.com/links/add.html">DZone</a>, or your favorite social networking site!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/05/10/northwind-vs-adventureworks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Javascript sleep function</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/05/06/javascript-sleep-function/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/05/06/javascript-sleep-function/#comments</comments>
		<pubDate>Thu, 07 May 2009 00:41:10 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1028</guid>
		<description><![CDATA[If you find yourself in need of a sleep function for client-side javascript, you&#8217;re probably doing it wrong and should be using asynchronous calls. But sometimes we don&#8217;t have full control of all the code, and we&#8217;re stuck doing something that mostly works rather than using the ideal solution.
To that end, here is a small [...]]]></description>
			<content:encoded><![CDATA[<p>If you find yourself in need of a sleep function for client-side javascript, you&#8217;re probably doing it wrong and should be using asynchronous calls. But sometimes we don&#8217;t have full control of all the code, and we&#8217;re stuck doing something that mostly works rather than using the ideal solution.</p>
<p>To that end, here is a small function to cause synchronous javascript to sleep / pause.</p>
<pre name="code" class="javascript">

function sleep(ms)
{
var complete = new Date();
complete.setTime(complete.getTime() + ms);
while (new Date().getTime() &lt; complete.getTime());
}
</pre>
<div class="note">Do not use this for large loops, you&#8217;ll kill the browser. It eats CPU cycles for breakfast.</div>
<p><strong>Example call</strong></p>
<p>&lt;body&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
function sleep(ms)<br />
{<br />
var complete = new Date();<br />
complete.setTime(complete.getTime() + ms);<br />
while (new Date().getTime() < complete.getTime());<br />
}</p>
<p>alert("hi!");<br />
sleep(4000);<br />
alert("done");<br />
&lt;/script&gt;<br />
&lt;/body&gt;</p>
<p>Note that the elaspsed time is not exact. This is just to pause to give code that isn't behaving time to work, for example, in older COM components that are being constructed on the client and then used, but you need to give it a second to load up.</p>
<p><strong>Got a better way to accomplish this? Please let me know in the comments!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/05/06/javascript-sleep-function/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Furry Friday? Nah, it’s CATURDAY!</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/05/02/furry-friday-nah-its-caturday/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/05/02/furry-friday-nah-its-caturday/#comments</comments>
		<pubDate>Sat, 02 May 2009 15:30:34 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Cats]]></category>

		<category><![CDATA[caturday]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1019</guid>
		<description><![CDATA[
I have a big ole&#8217; soft spot for Sphynx&#8230;





see more Lolcats and funny pictures
]]></description>
			<content:encoded><![CDATA[<p><a href="http://icanhascheezburger.com/2009/04/18/funny-pictures-karl-do-u/"><img class="mine_3754390" title="funny-pictures-one-cat-hears-bad-sounds" src="http://icanhascheezburger.wordpress.com/files/2009/03/funny-pictures-one-cat-hears-bad-sounds.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><strong>I have a big ole&#8217; soft spot for Sphynx&#8230;</strong></p>
<p><a href="http://www.stuffonmycat.com/Clothes-On-My-Cat/20090417-gizmo2.html"><img src="http://www.stuffonmycat.com/images/stories/20090417_gizmo2.jpg" alt="" /></a></p>
<p><a href="http://www.stuffonmycat.com/Clothes-On-My-Cat/20090417-gizmo.html"><img src="http://www.stuffonmycat.com/images/stories/20090417_gizmo.jpg" alt="" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/04/27/funny-pictures-in-cow-poop/"><img class="mine_3810386" title="funny-pictures-cat-hates-nature" src="http://icanhascheezburger.wordpress.com/files/2009/04/funny-pictures-cat-hates-nature1.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><a href="http://www.stuffonmycat.com/Misc.-On-My-Cat/20090427-oliver.html"><img src="http://www.stuffonmycat.com/images/stories/20090427_oliver.jpg" alt="" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/04/29/funny-pictures-him-s-my-friend/"><img class="mine_3836245" title="funny-pictures-cat-is-friends-with-his-scratching-post" src="http://icanhascheezburger.wordpress.com/files/2009/04/funny-pictures-cat-is-friends-with-his-scratching-post.jpg" alt="funny pictures of cats with captions" /></a><br />
see more <a href="http://icanhascheezburger.com">Lolcats and funny pictures</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/05/02/furry-friday-nah-its-caturday/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google local search tip</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/04/25/google-local-search-tip/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/04/25/google-local-search-tip/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 00:35:38 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Newbie Geek]]></category>

		<category><![CDATA[Tidbit]]></category>

		<category><![CDATA[Google search tips]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1022</guid>
		<description><![CDATA[For those of you who don&#8217;t know, I&#8217;m a Google fan. The thing about their searches, though, is that in order to make truly effective use of it, you do have to know how to use it. Here is a tip for finding local businesses &#8212; to find furniture stores near your house, go to [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who don&#8217;t know, I&#8217;m a Google fan. The thing about their searches, though, is that in order to make truly effective use of it, you do have to <a href="http://www.kaelisspace.com/wordpress22/2008/01/22/top-umpteen-obscure-google-search-tips/">know how to use it</a>. Here is a tip for finding local businesses &#8212; to find furniture stores near your house, go to <a href="http://maps.google.com/">Google maps</a> and in the search box, type</p>
<blockquote><p><em>furniture </em>within <em>20 </em>miles <em>Chicago IL</em></p></blockquote>
<p>Your search term, say &#8220;furniture&#8221;, within X miles, then your city and state.</p>
<p>You will get local results. You&#8217;re welcome.  =)</p>
<p>You can also use the more advanced keywords &#8220;loc&#8221; and &#8220;category&#8221; if you&#8217;re brave. E.g.:</p>
<blockquote><p>category:&#8221;Retail Stores - Furniture&#8221; loc: chicago il</p></blockquote>
<p>I LOVE Google search tips. Got any more?<strong> Please share in the comments!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/04/25/google-local-search-tip/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ASP.NET vs anything</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/04/22/aspnet-vs-anything/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/04/22/aspnet-vs-anything/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 14:00:09 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Bloggerific]]></category>

		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[opinion]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[web development frameworks]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1017</guid>
		<description><![CDATA[I read yet another ASP.NET vs PHP post. It got me thinking&#8230;
In case you can&#8217;t tell by looking at the category listing over on the right, my primary focus is the back-end of intranet applications using the .NET framework. I tinker with winforms and console applications, but that isn&#8217;t what I spend most of my [...]]]></description>
			<content:encoded><![CDATA[<p>I read yet another ASP.NET vs PHP post. It got me thinking&#8230;</p>
<p>In case you can&#8217;t tell by looking at the category listing over on the right, my primary focus is the back-end of intranet applications using the .NET framework. I tinker with winforms and console applications, but that isn&#8217;t what I spend most of my time doing. Code behind files, libraries, windows services, and web services take up most of my daytime life.</p>
<p>There is a LOT to know about .NET. There are a multitude of certifications, and the track for web applications is different from windows forms applications. It takes years to master. I am constantly learning, even after over 3 years coding with it.</p>
<p>Notice how I said &#8220;the .NET framework&#8221;? I didn&#8217;t say C#.NET or VB.NET. <strong>The .NET framework is exactly that &#8212; a framework. </strong>C# is a language. C++ is the bastard stepchild no one talks about but many use and love. You can see where this is going, can&#8217;t you?</p>
<p><strong>You cannot compare .NET to PHP or Java and have it mean anything to me.</strong> Comparing a framework to a language is apples and oranges. If you want to compare language features, even VB, C++, and C# have differences within the .NET framework.</p>
<p>If you want to post about which development framework someone should choose for their web application, I want to see you pick another actual framework to compare it TO. There are a <a href="http://www.phpframeworks.com/">multitude of frameworks available for PHP</a>. There are over 100 for Java, <a href="http://developers.sun.com/learning/javaoneonline/2008/pdf/TS-6457.pdf">according to this pdf sheet from Sun called &#8220;Choosing A Java Web Framework</a>&#8220;. I haven&#8217;t used any of them. <strong>I want to know what the framework can do, not what the core language supports.</strong></p>
<p>I love the .NET Framework. I&#8217;ve played with PHP enough to be dangerous. I can mess with WordPress and make quick scripts for servers that only have PHP on them. I know enough Java to be dangerous, too, and coded with it for 5 years, but it was long enough ago that most everything has changed (I started back on java 1.2, before they even had regular expressions and I had to hack Netscape Enterprise Server on a Solaris box to get JSP working, because they wouldn&#8217;t let me use Apache).</p>
<p>I do know, though, that <strong>there are frameworks for those languages, and they have different capabilities, strengths, and weaknesses. </strong>If I want to compare ASP.NET to Java, I need to detail frameworks like EJB. If I want to compare it to PHP, I need to actually research the various PHP frameworks, like Zend, to see if they offer particular features.</p>
<p>I&#8217;m pretty sure that PHP and Java frameworks are complex enough that someone who normally develops with .NET would not be able to tell what they can and cannot do without looking it up in the data sheets. I am also pretty sure they take a decent amount of time to master, just like .NET does.</p>
<p><strong>My point is &#8212; if you want to write up a great comparison for people to choose a web development platform, you have to compare apples to apples. </strong></p>
<p>What do you think? Since PHP and Java are separate from their frameworks, but C#.NET and VB.NET are really subsets of the .NET framework in its entirety, is it fair to compare? Shouldn&#8217;t people be comparing Zend to ASP.NET, or EJB to ASP.NET, not PHP or Java to ASP.NET?</p>
<p><strong>I&#8217;d love to hear what you think. Let me know in the comments!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/04/22/aspnet-vs-anything/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using XSLT For Dynamic Content</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/04/20/using-xslt-for-dynamic-content/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/04/20/using-xslt-for-dynamic-content/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 04:53:24 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[VB.NET]]></category>

		<category><![CDATA[XML]]></category>

		<category><![CDATA[xml transforms]]></category>

		<category><![CDATA[xsl]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=1009</guid>
		<description><![CDATA[I read this post on XSLT and dynamic content in ASP.NET, and at the time, I didn&#8217;t think it applied to anything I did. I&#8217;m always willing to experiment with new code and I do try to be open minded about implementation, though.
It struck me that the author&#8217;s comment on when to use this design never [...]]]></description>
			<content:encoded><![CDATA[<p>I read <a href="http://www.novologies.com/post/2009/01/14/Constructing-Web-Interfaces-on-the-Fly.aspx">this post on XSLT and dynamic content in ASP.NET</a>, and at the time, I didn&#8217;t think it applied to anything I did. I&#8217;m always willing to experiment with new code and I do try to be open minded about implementation, though.</p>
<p>It struck me that the author&#8217;s comment on when to use this design never applies to me for the applications I work with daily:</p>
<blockquote><p>&#8220;Best suited for applications with high data complexity and ones that are expected to change significantly and frequently. In addition, this allows for a lot of room for creativity as far as interface design goes.&#8221;</p></blockquote>
<p>Also, in the example code, there are no server controls (at least not that I saw). There isn&#8217;t a single application I&#8217;ve ever done in ASP.NET that didn&#8217;t need to postback and manipulate controls, check what the user entered, and so on. So, I filed the idea for later.</p>
<p>I bring this up because when I was trolling the asp.net forums for an idea for a post and saw what looked like a pretty easy question on how to implement a simple trivia question/answer page, I thought I could get some practice with a few different ideas, including this one - the idea of generating content and controls with transformations.</p>
<p><strong>This post is the result of my deciding to play</strong>. I won&#8217;t say it&#8217;s the best way to implement it, only that it is A way to do so. I wanted to use VB.NET (<a href="http://www.codinghorror.com/blog/archives/001248.html">after a blurb in a post on another site </a>mentioned how few good examples are available in the language) and XSLT transforms and not rely on a database like I normally do, and I wanted to see if I could use XSLT and server controls together, so I used this idea of a little trivia to do that.</p>
<p><span id="more-1009"></span></p>
<p><strong>There are 4 files involved here</strong></p>
<ul>
<li>Trivia.xml - the xml containing the questions, answer sets, and correct answers</li>
<li>Trivia.xsl - the stylesheet used to transform the xml file into html and asp.net server controls</li>
<li>TriviaExample.aspx - basically just a container for the transformed controls, with a button to submit and a label to display the correct answer count</li>
<li>TriviaExample.aspx.vb - code behind file. Does the transform, generates controls, and checks the answers</li>
</ul>
<p>The page generates simple headings and radio buttons with the questions. When the visitor selects answers and clicks the submit button, correct answers and incorrect answers are colored and the correct answer count is written at the bottom. I made no attempt at making it pretty. <strong>This is about functionality &#8212; how do I generate usable controls that maintain state and validate the values as correct or incorrect upon postback.</strong> You can use CSS to make it pretty.</p>
<div class="note">The IDs of the questions and answers are important, as the controls use them when they generate and the answers are checked by ID</div>
<p><strong>Trivia.xml</strong></p>
<pre name="code" class="xml">

&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;questions&gt;
  &lt;question id=&quot;1&quot;&gt;
    &lt;text&gt;A group of cats is called a clowder. A group of kittens is called a _____.&lt;/text&gt;
    &lt;possibleAnswers&gt;
      &lt;answer id=&quot;1&quot;&gt;chowder&lt;/answer&gt;
      &lt;answer id=&quot;2&quot;&gt;kindle&lt;/answer&gt;
      &lt;answer id=&quot;3&quot;&gt;spindle&lt;/answer&gt;
      &lt;answer id=&quot;4&quot;&gt;basket o&#039; love&lt;/answer&gt;
    &lt;/possibleAnswers&gt;
    &lt;correctAnswer&gt;2&lt;/correctAnswer&gt;
  &lt;/question&gt;
  &lt;question id=&quot;2&quot;&gt;
    &lt;text&gt;Cats have _____ vertebrae.&lt;/text&gt;
    &lt;possibleAnswers&gt;
      &lt;answer id=&quot;1&quot;&gt;10&lt;/answer&gt;
      &lt;answer id=&quot;2&quot;&gt;20&lt;/answer&gt;
      &lt;answer id=&quot;3&quot;&gt;30&lt;/answer&gt;
      &lt;answer id=&quot;4&quot;&gt;32&lt;/answer&gt;
    &lt;/possibleAnswers&gt;
    &lt;correctAnswer&gt;3&lt;/correctAnswer&gt;
  &lt;/question&gt;
  &lt;question id=&quot;3&quot;&gt;
    &lt;text&gt;All cats are born with blue eyes.&lt;/text&gt;
    &lt;possibleAnswers&gt;
      &lt;answer id=&quot;1&quot;&gt;true&lt;/answer&gt;
      &lt;answer id=&quot;2&quot;&gt;false&lt;/answer&gt;
    &lt;/possibleAnswers&gt;
    &lt;correctAnswer&gt;1&lt;/correctAnswer&gt;
  &lt;/question&gt;
  &lt;question id=&quot;4&quot;&gt;
    &lt;text&gt;Cats and dogs are examples of digitigrade mammals; that is, they walk on their toes. In contrast, bears and humans are _____.&lt;/text&gt;
    &lt;possibleAnswers&gt;
      &lt;answer id=&quot;1&quot;&gt;unguligrade&lt;/answer&gt;
      &lt;answer id=&quot;2&quot;&gt;plantigrade&lt;/answer&gt;
      &lt;answer id=&quot;3&quot;&gt;pedigrade&lt;/answer&gt;
    &lt;/possibleAnswers&gt;
    &lt;correctAnswer&gt;2&lt;/correctAnswer&gt;
  &lt;/question&gt;
  &lt;question id=&quot;5&quot;&gt;
    &lt;text&gt;If a dog has a spotted black tongue, it must have Chow Chow in the lineage.&lt;/text&gt;
    &lt;possibleAnswers&gt;
      &lt;answer id=&quot;1&quot;&gt;true&lt;/answer&gt;
      &lt;answer id=&quot;2&quot;&gt;false&lt;/answer&gt;
    &lt;/possibleAnswers&gt;
    &lt;correctAnswer&gt;2&lt;/correctAnswer&gt;
  &lt;/question&gt;
&lt;/questions&gt;
</pre>
<p><strong>Trivia.xsl</strong></p>
<pre name="code" class="xml">

&lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&gt;
&lt;xsl:stylesheet version=&quot;1.0&quot;
xmlns:xsl=&quot;&lt;a href=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;http://www.w3.org/1999/XSL/Transform&lt;/a&gt;&quot;
xmlns:asp=&quot;remove&quot;&gt;
  &lt;xsl:template match=&quot;question&quot;&gt;
    &lt;xsl:variable name=&quot;questionID&quot;&gt;
      &lt;xsl:value-of select=&quot;@id&quot;/&gt;
    &lt;/xsl:variable&gt;
    &lt;asp:Panel ID=&quot;Panel_{$questionID}&quot; runat=&quot;server&quot;&gt;
      &lt;h2&gt;
        Question &lt;xsl:copy-of select=&quot;$questionID&quot;/&gt;
      &lt;/h2&gt;
      &lt;p&gt;
        &lt;xsl:value-of select=&quot;text&quot;/&gt;
      &lt;/p&gt;
      &lt;xsl:for-each select=&quot;possibleAnswers/answer&quot;&gt;
        &lt;xsl:variable name=&quot;answerID&quot;&gt;
          &lt;xsl:value-of select=&quot;@id&quot;/&gt;
        &lt;/xsl:variable&gt;
        &lt;xsl:variable name=&quot;answerText&quot;&gt;
          &lt;xsl:value-of select=&quot;.&quot;/&gt;
        &lt;/xsl:variable&gt;
        &lt;asp:RadioButton ID=&quot;rb_{$questionID}_{$answerID}&quot; runat=&quot;server&quot; Text=&quot;{$answerText}&quot; GroupName=&quot;question{$questionID}&quot; /&gt;
        &lt;br /&gt;
      &lt;/xsl:for-each&gt;
    &lt;/asp:Panel&gt;
    &lt;hr /&gt;
  &lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;
</pre>
<p><strong>TriviaExample.aspx</strong></p>
<pre name="code" class="vb">

&lt;%@ Page Language=&quot;VB&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;TriviaExample.aspx.vb&quot; Inherits=&quot;TriviaExample&quot; %&gt;

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;&lt;a href=&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&lt;/a&gt;&quot;&gt;
&lt;html xmlns=&quot;&lt;a href=&quot;http://www.w3.org/1999/xhtml&quot;&gt;http://www.w3.org/1999/xhtml&lt;/a&gt;&quot;&gt;
&lt;head runat=&quot;server&quot;&gt;
    &lt;title&gt;Trivia Example&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
        &lt;div&gt;
            &lt;asp:PlaceHolder ID=&quot;PlaceHolder1&quot; runat=&quot;server&quot;&gt;&lt;/asp:PlaceHolder&gt;
            &lt;br /&gt;
            &lt;asp:Button ID=&quot;Button1&quot; runat=&quot;server&quot; Text=&quot;Submit&quot; /&gt;&lt;br /&gt;
            &amp;amp;amp;amp;amp;nbsp;&lt;asp:Label ID=&quot;Label1&quot; runat=&quot;server&quot;&gt;&lt;/asp:Label&gt;&lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><strong>TriviaExample.aspx.vb</strong></p>
<pre name="code" class="vb">

Imports System.Xml.XPath
Imports System.Xml
Imports System.Xml.Xsl
Imports System.IO

Partial Class TriviaExample
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim oXmlTextReader As XmlTextReader = New XmlTextReader(Server.MapPath(&quot;~/App_Data/TriviaFile.xml&quot;))
        Dim sb As New StringBuilder
        Dim oXmlTextWriter As XmlTextWriter = New XmlTextWriter(New StringWriter(sb))
        Dim oXMLTrans As XslCompiledTransform = New XslCompiledTransform

        &#039;load the Stylesheet
        oXMLTrans.Load(Server.MapPath(&quot;~/App_Data/Trivia.xsl&quot;))

        &#039;Transform XML to HTML
        oXMLTrans.Transform(oXmlTextReader, oXmlTextWriter)
        Dim sHTML As String = sb.ToString

        If Not sHTML Is Nothing Then
            &#039;Remove the Definition for the &quot;namespace&quot; ASP, which has been created
            sHTML = sHTML.Replace(&quot;xmlns:asp=&quot;&quot;remove&quot;&quot;&quot;, &quot;&quot;)
        End If

        Dim oCtl As Control = Page.ParseControl(sHTML)
        PlaceHolder1.Controls.Clear()
        PlaceHolder1.Controls.Add(oCtl)

    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim correct As Integer = 0
        &#039; check the answers
        Dim oXmlDocument As XmlDocument = New XmlDocument()
        oXmlDocument.LoadXml(File.ReadAllText(Server.MapPath(&quot;~/App_Data/TriviaFile.xml&quot;)))

        &#039; We added the dynamic controls as a group in its own control to the placeholder
        For Each oControl As Control In PlaceHolder1.Controls(0).Controls
            &#039; we grouped the questions one per panel
            If TypeOf oControl Is Panel Then
                Dim questionID As String = oControl.ID.Replace(&quot;Panel_&quot;, &quot;&quot;)
                Dim oXmlNode As XmlNode = oXmlDocument.SelectSingleNode(&quot;/questions/question[@id=&quot; + questionID + &quot;]/correctAnswer&quot;)
                If Not oXmlNode Is Nothing Then
                    Dim rb As RadioButton = oControl.FindControl(&quot;rb_&quot; + questionID + &quot;_&quot; + oXmlNode.InnerText)
                    If Not rb Is Nothing Then
                        If rb.Checked Then
                            &#039; correct answer
                            CType(oControl, Panel).BackColor = Drawing.Color.Azure
                            correct += 1
                        Else
                            &#039; incorrect answer
                            CType(oControl, Panel).BackColor = Drawing.Color.LightCoral
                        End If
                    Else
                        &#039; error handling here
                    End If
                Else
                    &#039; your error handling here
                End If
            End If
        Next
        Label1.Text = &quot;You got &quot; + correct.ToString + &quot; correct!&quot;
    End Sub
End Class
</pre>
<p><strong>So, what do you think? Good idea, bad idea, just interesting? Comments are more than welcome! Don&#8217;t be shy.</strong></p>
<p><strong>If you enjoyed this post, I&#8217;d really appreciate it if you shared it! Share the love. Thanks!</strong></p>
<p><strong>Credits/resources:</strong><br />
<a href="http://www.novologies.com/post/2009/01/14/Constructing-Web-Interfaces-on-the-Fly.aspx">Constructing Web Interfaces on the Fly</a><br />
<a href="http://www.w3schools.com/XPath/xpath_syntax.asp">XPath Syntax</a><br />
<a href="http://www.devx.com/tips/Tip/27128">Use XSLT to Create an ASP.NET Page with ASP.NET Server Controls</a><br />
<a href="http://www.cafeconleche.org/books/bible2/chapters/ch17.html#d1e8497">XSLT Constants</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/04/20/using-xslt-for-dynamic-content/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Happy Caturday!</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/04/18/happy-caturday-3/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/04/18/happy-caturday-3/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 15:51:43 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Cats]]></category>

		<category><![CDATA[caturday]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=971</guid>
		<description><![CDATA[A cat discovers snow. Doesn&#8217;t really like it. LOL




Goofy kitty gets twitchy over the Evil Printer

]]></description>
			<content:encoded><![CDATA[<p>A cat discovers snow. Doesn&#8217;t really like it. LOL<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/3SB4zDuR8Oo&amp;rel=0&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/3SB4zDuR8Oo&amp;rel=0&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1"></embed></object></p>
<p><a href="http://mine.icanhascheezburger.com/view.aspx?ciid=3611268"><img src="http://images.icanhascheezburger.com/completestore/2009/3/7/128809546389990080.jpg" alt="funny pictures" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/04/02/funny-pictures-me-it-burns/"><img class="mine_3638722" title="funny-pictures-cat-does-not-like-to-wear-cross" src="http://icanhascheezburger.wordpress.com/files/2009/03/funny-pictures-cat-does-not-like-to-wear-cross1.jpg" alt="funny pictures of cats with captions" /></a></p>
<p><a href="http://www.stuffonmycat.com/Misc.-On-My-Cat/20090403-theo.html"><img src="http://www.stuffonmycat.com/images/stories/20090403_theo.jpg" alt="" /></a></p>
<p>Goofy kitty gets twitchy over the Evil Printer<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/bymRNX0NJDo&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/bymRNX0NJDo&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/04/18/happy-caturday-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Excel 2007 Auto-Filter</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/04/15/excel-2007-auto-filter/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/04/15/excel-2007-auto-filter/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 02:48:19 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Excel]]></category>

		<category><![CDATA[filtering]]></category>

		<category><![CDATA[remove duplicates]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=993</guid>
		<description><![CDATA[(click the images for larger versions)
Excel 2007 is your friend, really. The more I use it, the more I love it. It really IS easier to get things done with it, honest. The ribbon is annoying when you aren&#8217;t used to it, but after awhile, you won&#8217;t know what you did before. I promise, if [...]]]></description>
			<content:encoded><![CDATA[<p><em>(click the images for larger versions)</em></p>
<p>Excel 2007 is your friend, really. The more I use it, the more I love it. It really IS easier to get things done with it, honest. The ribbon is annoying when you aren&#8217;t used to it, but after awhile, you won&#8217;t know what you did before. I promise, if you give it a chance, you too can get over the fact that they <a href="http://www.amazon.com/Who-Moved-My-Cheese-Amazing/dp/0399144463">moved your cheese</a> and see all the neat stuff they added.</p>
<p><strong>Basic Auto-Filter </strong></p>
<p>Make sure your data has headings. Then, on the Data tab, choose Filter in the Sort and Filter section.</p>
<p><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter1.jpg"><img class="alignnone size-medium wp-image-994" title="excel filter 1" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter1-300x278.jpg" alt="" width="300" height="278" /></a></p>
<p>The header cells will then have arrows in them. Click the arrow, and a menu will pop up with a variety of choices. To just filter by the basic values, select it from the list.</p>
<p><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter2.jpg"><img class="alignnone size-medium wp-image-995" title="excel filter 2" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter2-279x300.jpg" alt="" width="279" height="300" /></a></p>
<p>Clicking OK will hide all the rows that don&#8217;t match, as shown here.</p>
<p><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter3.jpg"><img class="alignnone size-medium wp-image-996" title="excel filter 3" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter3-215x300.jpg" alt="" width="215" height="300" /></a></p>
<div class="note">Note: to quickly undo your filter(s), simply click the Filter button again to turn it off, then click it again to turn it on. It will reset the filter.</div>
<p><strong>Number / Text Filter</strong></p>
<p>You can also use a custom filter to display only rows matching a given criteria. For example, we only want to see products where the price is more than $100. When you click the arrow, you can see that <strong>Number Filters</strong> is displayed with a small arrow. Hover over it, and options like Equals and Greater Than are available.</p>
<p><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter4.jpg"><img class="alignnone size-medium wp-image-997" title="excel filter 4" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter4-300x277.jpg" alt="" width="300" height="277" /></a></p>
<p>Select Greater Than, and enter 100, and click OK.</p>
<p><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter5.jpg"><img class="alignnone size-medium wp-image-998" title="excel filter 5" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter5-300x251.jpg" alt="" width="300" height="251" /></a></p>
<p>You can see the custom filter has hidden all non-matching rows, as shown here.</p>
<p><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter6.jpg"><img class="alignnone size-medium wp-image-999" title="excel filter 6" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter6-300x293.jpg" alt="" width="300" height="293" /></a></p>
<p>Similarly, you can use custom filters for text fields as well. Text filters support wildcards such as ? and *.  For example, let&#8217;s say I only want to see products that have &#8220;LL&#8221; and &#8220;Rim&#8221; in the product name. Click the arrow, select Text Filters, select Contains, and enter &#8220;LL*Rim&#8221; without the quotes.</p>
<p><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter8.jpg"><img class="alignnone size-medium wp-image-1000" title="excel filter 8" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter8-300x213.jpg" alt="" width="300" height="213" /></a></p>
<p>See <a href="http://office.microsoft.com/en-us/excel/HP100739411033.aspx">Filter Data In A Range Or Table</a> for more.</p>
<p><strong>Filter By Color</strong></p>
<p>Let&#8217;s say that you set up <a href="http://office.microsoft.com/en-us/excel/HA101655491033.aspx?pid=CH100740791033">conditional formatting</a> so that cells with certain values were highlighted (it&#8217;s on the Home tab, in the Styles section). You can now easily filter your data by color, right from the same auto-filter menu. If your cells have colors, the option becomes available.</p>
<p><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter9.jpg"><img class="alignnone size-medium wp-image-1001" title="excel filter 9" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter9-300x228.jpg" alt="" width="300" height="228" /></a></p>
<p>Don&#8217;t use this trick to try to remove duplicates. While removing duplicates was a huge pain in older versions, it also is only a click away. You can remove duplicates by any cell value or set of cell values. It&#8217;s on the Data tab.</p>
<p><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter10.jpg"><img class="alignnone size-medium wp-image-1002" title="excel filter 10" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/excelfilter10-300x230.jpg" alt="" width="300" height="230" /></a></p>
<p>I hope this post has been helpful! If there are any other things you&#8217;d like to know how to do in Excel 2007, let me know in the comments!</p>
<p><strong>Sharing this post is sharing the love for the new Excel. Please bookmark and share it! I&#8217;d appreciate it  =)</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/04/15/excel-2007-auto-filter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Polar Bear Attacks Woman in Berlin Zoo</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/04/13/polar-bear-attacks-woman-in-berlin-zoo/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/04/13/polar-bear-attacks-woman-in-berlin-zoo/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 00:53:28 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[In The News]]></category>

		<category><![CDATA[responsibility]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=991</guid>
		<description><![CDATA[It&#8217;s rant time, folks&#8230;
A recent article, Polar Bear Attacks Woman in Berlin Zoo, has a sub-headline of &#8220;Are Zoos Safe Enough?&#8221; next to the video. If you watch the video, one of the news commenters talks about how we need to keep mentally unstable people safe from themselves (towards the end of the vid). He [...]]]></description>
			<content:encoded><![CDATA[<p><strong>It&#8217;s rant time, folks&#8230;</strong></p>
<p>A recent article, <a href="http://abcnews.go.com/GMA/AroundTheWorld/story?id=7320751&amp;page=1">Polar Bear Attacks Woman in Berlin Zoo</a>, has a sub-headline of &#8220;Are Zoos Safe Enough?&#8221; next to the video. If you watch the video, one of the news commenters talks about how we need to keep mentally unstable people safe from themselves (towards the end of the vid). He says, &#8220;Seems like you need better standards to help deal with people who seem to have a mental issue than what&#8217;s going on at the zoo&#8221;.</p>
<p><strong>Really? Are you kidding me? Please tell me you aren&#8217;t serious. Please.</strong></p>
<p>Zoos should have to do even more to keep stupid people from Darwinning themselves? I agree that zoos are 100% responsible for keeping animals IN the enclosures. However, they are 0% responsible for keeping adult humans OUT of them. Frankly, they are 0% responsible for keeping your children out of them, too. Watch your own kids.</p>
<p>I&#8217;m sorry, last I checked, adults were supposed to be responsible people with at least a bit of common sense. If someone is so messed up in the head that they think swimming in the pool with the polar bears is a swell idea, they shouldn&#8217;t be in the zoo.</p>
<p>I am reminded of those commercials with Susan Powter where she screams &#8212; STOP THE INSANITY!</p>
<p><strong>TAKE SOME DAMNED RESPONSIBILITY FOR YOUR OWN ACTIONS.</strong></p>
<blockquote><p>&#8220;Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety.&#8221;  &#8212; Benjamin Franklin</p></blockquote>
<p>This attitude is becoming sickeningly common in my world, and it&#8217;s making me very angry. Always trying to blame others, never taking responsibility. It permeates everything I see, from <a href="http://www.networkworld.com/community/node/27313">computer</a> <a href="http://blogs.zdnet.com/security/?p=1059">programming</a> to <a href="http://www.ctvbc.ctv.ca/servlet/an/local/CTVNews/20090412/bc_pitbull_demo_090412/20090412/?hub=BritishColumbiaHome">dog</a> <a href="http://www.ktre.com/Global/story.asp?S=10146865&amp;nav=2FH5">bites</a>, from <a href="http://archives.chicagotribune.com/2008/sep/04/local/chi-starved-rock-fall-websep05">hiking </a>to <a href="http://news.bbc.co.uk/2/hi/asia-pacific/7743748.stm">zoos</a>. Someone else is supposed to prevent them from <a href="http://en.wikipedia.org/wiki/Diving#Safety">diving where they shouldn&#8217;t</a>. Someone else should <a href="http://www.rinkworks.com/said/warnings.shtml">warn them not to insert things into various orifices</a>. Schools should be <a href="http://www.theadvocates.org/freeman/9607frit.html">raising their children</a>. Sin <a href="http://www.tampabay.com/news/health/article986834.ece">taxes for cigarettes</a> because it makes people quit. Same for those pesky, <a href="http://www.walletpop.com/blog/2008/12/15/lawmakers-create-a-fat-tax-for-non-diet-sodas/">high calorie sodas</a> that are making people fat. We&#8217;ve made it the law to protect yourself, from helmets to seat belts. Big Brother in the name of public safety.</p>
<blockquote><p>&#8220;If guns kill people, then pencils misspell words&#8221; &#8212; t-shirt wisdom</p></blockquote>
<p><strong>When will enough be enough?</strong> When everything we do is controlled by someone else? When we never stop having someone to parent us and protect us from ourselves? How <a href="http://en.wikipedia.org/wiki/Totalitarianism">totalitarianistic</a> would you like your America, all in the name of public safety, health, and protecting citizens?</p>
<p><strong>Please, tell me I am not alone. Sharing this article is sharing a little sanity &#8212; please bookmark it or share it on your favorite social site.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/04/13/polar-bear-attacks-woman-in-berlin-zoo/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Link Love</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/04/12/link-love-5/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/04/12/link-love-5/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 13:45:27 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[link love]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=974</guid>
		<description><![CDATA[
What I&#8217;ve been reading lately&#8230;
Advanced Regular Expressions in C# - neat tricks, including how to comment the expression
Understanding JavaScript&#8217;s this keyword- this post (and subsequent comments) helped clear up a couple things for me.
Table Layouts vs. Div Layouts: From Hell to… Hell? - Another awesome Smashing Magazine post helping those of us who aren&#8217;t the [...]]]></description>
			<content:encoded><![CDATA[<p><img title="linklove" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/linklove.jpg" alt="Link Love" hspace="5" vspace="5" width="150" height="100" align="left" /></p>
<p>What I&#8217;ve been reading lately&#8230;</p>
<p><a href="http://www.dijksterhuis.org/regular-expressions-advanced/">Advanced Regular Expressions in C#</a> - neat tricks, including how to comment the expression</p>
<p><a href="http://trephine.org/t/index.php?title=Understanding_JavaScript%27s_this_keyword">Understanding JavaScript&#8217;s this keyword</a>- this post (and subsequent comments) helped clear up a couple things for me.</p>
<p><a href="http://www.smashingmagazine.com/2009/04/08/from-table-hell-to-div-hell/">Table Layouts vs. Div Layouts: From Hell to… Hell?</a> - Another awesome Smashing Magazine post helping those of us who aren&#8217;t the best at the front-end design use semantic layouts instead of relying on tables.</p>
<p><a href="http://dilbert.com/blog/entry/pilot_and_tech_support/">Pilot and Tech Support</a> - One of the more amusing posts over at Scott Adams&#8217; blog lately. Great for a laugh.</p>
<p><a href="http://css-tricks.com/six-year-old/">Need Something Changed On Your Website? Treat Me Like a Six-Year-Old (Really)</a> - I run into this same issue with our corporate website.</p>
<p><a href="http://www.jonathanfields.com/blog/are-you-an-mo-snob/">Are You an M.O. Snob? </a>- Programmers need to effectively communicate with humans, too. This post reminds us that not everyone thinks like we do. Not specific to programming - worth a read for anyone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/04/12/link-love-5/feed/</wfw:commentRss>
		</item>
		<item>
		<title>There is a dog in McDonald’s!</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/04/02/there-is-a-dog-in-mcdonalds/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/04/02/there-is-a-dog-in-mcdonalds/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 00:07:37 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Dogs]]></category>

		<category><![CDATA[dog law]]></category>

		<category><![CDATA[service dogs]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=985</guid>
		<description><![CDATA[A woman posted to one of the yahoo groups I belong to that a certain local establishment refused to serve her because she had her guide dog with her. The manager of that establishment apparently did not know about, and did not want to hear about, the Americans With Disabilities Act. He refused her service. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/cobalt/3032144418/sizes/s/"><img title="photo courtesy cobalt123 on Flickr" src="http://farm4.static.flickr.com/3182/3032144418_45ca6860a5_m.jpg" border="0" alt="photo courtesy cobalt123 on Flickr" hspace="5" vspace="5" width="240" height="197" align="right" /></a>A woman posted to one of the yahoo groups I belong to that a certain local establishment refused to serve her because she had her guide dog with her. The manager of that establishment apparently did not know about, and did not want to hear about, the <a href="http://www.guidedogs.com/site/PageServer?pagename=resources_access_overview">Americans With Disabilities Act</a>. He refused her service. When she left and decided to go to a local McDonald&#8217;s, the manager THERE gave her a hard time too, but relented.</p>
<p>I am constantly surprised when I hear about places large and small where the staff is apparently ignorant that disabled people with service dogs are allowed to bring their dogs in with them <a href="http://www.cometcanine.com/assistance-dogs/service-dog-ada-rules.html">ANYWHERE THEY GO</a>.</p>
<p><strong>Let me repeat that. Service dogs are allowed to go anywhere their owners are allowed to go in public, including privately owned businesses that serve the public.</strong></p>
<p>If you are a manager, franchise owner, or work in any public industry, please be aware that if you bar a disabled person from bringing their service dog into your place of business, you can be fined or even sued, as <a href="http://www.njcounciloftheblind.org/laws/us_ada_guide_dog_law.htm">you just broke the law</a>.</p>
<p><strong>Some examples of places that service dogs are allowed:</strong></p>
<ul>
<li>The grocery store</li>
<li>Fast food restaurants such as McDonald&#8217;s or Burger King</li>
<li>Fancy pants restaurants such as Tre La La</li>
<li>The library</li>
<li>Public transportation, such as buses, cabs, and trains</li>
<li>Wal-Mart, Target, and Macy&#8217;s</li>
<li>Hospitals and medical offices</li>
<li>Movie theaters</li>
</ul>
<p>If you frequent a business and you see a person with their service dog, you do not get to complain about, harass, or in any way interfere with the person or the dog. Don&#8217;t be an ass and complain that there is a dog in the restaurant. Your allergies or dislike of dogs are less important than someone being able to function safely in public.</p>
<p><strong>If you work in retail or the food industry, or know anyone who does, please help get the word out about service dogs</strong>.<strong> Share this post liberally!</strong></p>
<p><strong>See also:</strong><br />
<a href="http://www.ada.gov/qasrvc.htm">COMMONLY ASKED QUESTIONS ABOUT SERVICE ANIMALS IN PLACES OF BUSINESS</a><br />
<a href="http://www.ada.gov/svcanimb.htm">ADA Business BRIEF: Service Animals</a><br />
<a href="http://www.ada.gov/svcabrs3.pdf">ADA Handout pdf print version</a><br />
<a href="http://www.servicedogssavelives.org/statelaws.html">Laws By State</a> - states are allowed to have tougher laws than the federal version.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/04/02/there-is-a-dog-in-mcdonalds/feed/</wfw:commentRss>
		</item>
		<item>
		<title>5 Cat Training Quickies</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/04/02/5-cat-training-quickies/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/04/02/5-cat-training-quickies/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 13:00:02 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Cats]]></category>

		<category><![CDATA[cat training]]></category>

		<category><![CDATA[clawing]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=979</guid>
		<description><![CDATA[Remember fellow kitty aficionados, training a cat is about convincing it that it wants what you want it to want&#8230;
1. To convince a cat to stay off a counter or other flat surface, put a sink or shower mat that has little nubs on it, upside down. The cat will choose to stay off because [...]]]></description>
			<content:encoded><![CDATA[<p>Remember fellow kitty aficionados, training a cat is about convincing it that it wants what you want it to want&#8230;</p>
<p><img title="sinkmat" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/04/sinkmat.jpg" alt="sink mat" hspace="5" vspace="5" width="105" height="105" align="right" />1. <strong>To convince a cat to stay off a counter or other flat surface</strong>, put a sink or shower mat that has little nubs on it, upside down. The cat will <a href="http://www.kaelisspace.com/wordpress22/2008/01/09/how-to-keep-your-cat-off-the-furniture/">choose to stay off</a> because the surface is uncomfortable. After a little while, they&#8217;ll forget about going up there.</p>
<p>2. <strong>To convince a cat it <a href="http://www.kaelisspace.com/wordpress22/2007/01/02/help-my-cat-is-killing-my-couch/">doesn&#8217;t want to claw the side of your couch</a></strong>, put a scratching post or other item in the way. A post is best because it develops a new habit &#8212; using the post!</p>
<p>3. <strong>To help a <a href="http://www.kaelisspace.com/wordpress22/2007/12/13/omg-they-stole-my-house/">cat feel more comfortable in a new house</a></strong>, confine it to a single quiet room, such as the bedroom, that has plenty of your scents, but less foreign noises and sights. Leave the TV or radio on quietly to mitigate the new sounds of the home.</p>
<p>4. <strong>Stubborn kitties don&#8217;t care if you squirt them with water to discourage them from unwanted behaviors. </strong>Some breeds, such as the <a href="http://www.youtube.com/results?search_type=&amp;search_query=bengal+water&amp;aq=f">Bengal</a>, may even <em>like </em>water. Most cats, however, really hate a penny can tossed near them. (a penny can is just an empty can of soda with a couple of coins in it, taped shut) This doesn&#8217;t mean to nail your cat with the penny can! Toss it near them, not AT them. <strong>Best results are achieved if you set the penny can up to fall without you present</strong>, such as setting it on the edge of the surface or item the cat tends to bother.</p>
<p><a href="http://www.flickr.com/photos/colbycosh/"><img title="kitty photo courtesy colbycosh on Flickr" src="http://farm1.static.flickr.com/21/92357534_a7dadaaa5c_t.jpg" border="0" alt="photo courtesy colbycosh on Flickr" hspace="5" vspace="5" width="100" height="90" align="left" /></a>5. <strong>Sometimes it&#8217;s better to just prevent problems.</strong> Kitty chewing your shoes? Put them away. Getting into the garbage? Get a can with a lid. Eating your hair ribbons? Stop leaving them out. Cats are a lot like babies &#8212; you have to <a href="http://cats.about.com/cs/kittencare/ht/kittenproof.htm">kitty proof the house</a>. Too much temptation is just setting yourself up for a headache.</p>
<p><strong>Do you have any tips you&#8217;d like to share? Please post them in the comments!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/04/02/5-cat-training-quickies/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Still More Fun With DateTime</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/03/30/still-more-fun-with-datetime/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/03/30/still-more-fun-with-datetime/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 03:32:09 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[C#.NET]]></category>

		<category><![CDATA[DateTime]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=976</guid>
		<description><![CDATA[DateTime is fun, really. You can get the difference between dates, get the first Sunday of some arbitrary year, or implement business logic to define a week of the year.


using System;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)  
        {  
            DateTime theDate = DateTime.Parse(&#34;03/12/2008&#34;); 
     [...]]]></description>
			<content:encoded><![CDATA[<p>DateTime is fun, really. You can get the difference between dates, get the first Sunday of some arbitrary year, or implement business logic to define a week of the year.</p>
<pre name="code" class="csharp">

using System;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)  
        {  
            DateTime theDate = DateTime.Parse(&quot;03/12/2008&quot;); 
            // the day of the week that was, as an integer (0-based)
            Console.WriteLine(String.Format(&quot;day of week, as integer, was {0}&quot;, (int)theDate.DayOfWeek));

            // the day of the week that was, as a string (&quot;Wednesday&quot;)
            Console.WriteLine(String.Format(&quot;day of week, as integer, was {0}&quot;, theDate.DayOfWeek));  

            // first day of the week, Sunday, date 
            DateTime firstOfWeek = theDate.AddDays((int)DayOfWeek.Sunday - (int)theDate.DayOfWeek);
            Console.WriteLine(String.Format(&quot;first day of the week, Sunday, was {0}&quot;, firstOfWeek.ToShortDateString()));

            // first Sunday of the calendar year of that date
            DateTime firstOfYear = new DateTime(theDate.Year, 1, 1);
            DateTime firstSundayOfYear = firstOfYear.AddDays((int)DayOfWeek.Sunday - (int)firstOfYear.DayOfWeek);
            if (firstSundayOfYear &lt; firstOfYear) firstSundayOfYear = firstSundayOfYear.AddDays(7);
            Console.WriteLine(String.Format(&quot;first sunday of year is/was {0}&quot;, firstSundayOfYear.ToShortDateString()));  

            // the week of the year that was, 1 - 52, as the difference between this last sunday and the first sunday of the year, in weeks
            // (your definition of &quot;week of the year&quot; may vary, this is not standardized)
            TimeSpan difference = firstOfWeek - firstSundayOfYear;
            int numWeeks = (int)difference.TotalDays / 7;
            Console.WriteLine(String.Format(&quot;week number is/was {0}&quot;, numWeeks.ToString()));  

            Console.Read();  
        }
    }
}
</pre>
<p><strong>Related posts:</strong> <br />
<a href="http://www.kaelisspace.com/wordpress22/2008/06/17/cnet-4-payrollcalendar-date-calculations/">C#.NET: 4 payroll/calendar date calculations</a><br />
<a href="http://www.kaelisspace.com/wordpress22/2008/11/17/fun-with-datetime/">Fun with DateTime</a> </p>
<p><strong>Did this help you? Please bookmark or share it! Did I mess up anywhere? Let me know in the comments.  =)</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/03/30/still-more-fun-with-datetime/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Link Love</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/03/29/link-love-4/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/03/29/link-love-4/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 23:07:06 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[link love]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=954</guid>
		<description><![CDATA[





What ASP.NET MVC Can Learn From Ruby On Rails - Informative post about what ASP.NET MVC lacks. Is there even a point to an MVC framework that lacks a decent model?
Fire your best people…reward the lazy ones - I&#8217;m the lazy one.
8-year-olds should test my code - it&#8217;s always good to have people who are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kevinwilliampang.com/post/What-ASPNET-MVC-Can-Learn-From-Ruby-on-Rails.aspx"><span style="color: #000000; text-decoration: none;"></p>
<div class="mceTemp">
<dl id="attachment_950" class="wp-caption alignleft" style="width: 160px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-950" title="linklove" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/linklove.jpg" alt="Link Love" width="150" height="100" /></dt>
</dl>
</div>
<p></span></a><a href="http://www.kevinwilliampang.com/post/What-ASPNET-MVC-Can-Learn-From-Ruby-on-Rails.aspx">What ASP.NET MVC Can Learn From Ruby On Rails</a> - Informative post about what ASP.NET MVC lacks. Is there even a point to an MVC framework that lacks a decent model?</p>
<p><a title="Permanent Link: Fire your best people…reward the lazy ones" href="http://www.testearly.com/2007/08/17/fire-your-best-peoplereward-the-lazy-ones/">Fire your best people…reward the lazy ones</a> - I&#8217;m the lazy one.</p>
<p><a title="Permanent Link: 8-year-olds should test my code" href="http://www.cs.nyu.edu/~michaels/blog/?p=15">8-year-olds should test my code</a> - it&#8217;s always good to have people who are not you test your code</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ehszf8ax(VS.80).aspx">Walkthrough: Creating and Using ASP.NET Master Pages in Visual Web Developer</a> - Walkthrough that is pretty basic, but includes the answer to a commonly asked question &#8212; how to share content between master and content pages</p>
<p><a href="http://www.squawkfox.com/2009/01/19/6-words-that-make-your-resume-suck/">6 Words That Make Your Resume Suck</a> - because in this economy, the more help we can get, the better. I know I&#8217;ve used these words (phrases) before.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/03/29/link-love-4/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Moar Caturday</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/03/28/moar-caturday/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/03/28/moar-caturday/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 15:00:29 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Cats]]></category>

		<category><![CDATA[caturday]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=939</guid>
		<description><![CDATA[





moar funny pictures
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.stuffonmycat.com/Clothes-On-My-Cat/20090313-mishka-bj.html"><img src="http://www.stuffonmycat.com/images/stories/20090313_mishka_bj.jpg" alt="" /></a></p>
<p><a href="http://www.stuffonmycat.com/Wet-Cats/20090317-wrigleys3.html"><img src="http://www.stuffonmycat.com/images/stories/20090317_wrigleys3.jpg" alt="" /></a></p>
<p><a href="http://www.stuffonmycat.com/Creatures-On-My-Cat/20090323-picollo-sister.html"><img src="http://www.stuffonmycat.com/images/stories/20090323_picollo_sister.jpg" alt="" /></a></p>
<p><img src="http://images.icanhascheezburger.com/completestore/2009/3/23/128823339422607921.jpg" alt="" /></p>
<p><a href="http://mine.icanhascheezburger.com/view.aspx?ciid=3591525"><img src="http://images.icanhascheezburger.com/completestore/2009/3/5/128807683801781714.jpg" alt="funny pictures" /></a></p>
<p><a href="http://mine.icanhascheezburger.com/view.aspx?ciid=3706247"><img src="http://images.icanhascheezburger.com/completestore/2009/3/18/128819087621343717.jpg" alt="funny pictures" /></a><br />
moar <a href="http://icanhascheezburger.com">funny pictures</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/03/28/moar-caturday/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Excel 2007 - Where Did They Put That?</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/03/27/excel-2007-where-did-they-put-that/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/03/27/excel-2007-where-did-they-put-that/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 03:46:46 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Excel]]></category>

		<category><![CDATA[Newbie Geek]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=962</guid>
		<description><![CDATA[ I recently started using Office 2007, including the new Excel. As I&#8217;m sure you&#8217;ve heard, they&#8217;ve completely revamped it. Some people don&#8217;t seem to like it.
Not everyone likes change. Okay, that&#8217;s an understatement. People HATE change. It&#8217;s something developers know &#8212; people are used to where things are, they have notions of where things [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/excelhelp.jpg" alt="the help menu" hspace="5" vspace="5" width="334" height="416" align="left" /> I recently started using Office 2007, including the new <strong>Excel</strong>. As I&#8217;m sure you&#8217;ve heard, <a href="http://office.microsoft.com/en-us/help/HA100738731033.aspx">they&#8217;ve completely revamped it</a>. Some people <a href="http://www.mrexcel.com/tip144.shtml">don&#8217;t seem to like it</a>.</p>
<p>Not everyone likes change. Okay, that&#8217;s an understatement. <strong>People HATE change.</strong> It&#8217;s something developers know &#8212; people are used to where things are, they have notions of where things should be, and they get upset when they can&#8217;t figure out how to do a task. No one likes to rediscover how to accomplish a task they used to perform with their eyes half closed before their morning caffeine jolt.</p>
<p>I&#8217;ll go on record as saying <strong>I LOVE Office 2007</strong>. Once I found where they put things, it became even easier to perform my usual tasks. I didn&#8217;t have any real trouble finding what I needed in their <a href="http://office.microsoft.com/en-us/excel/FX100646951033.aspx">Help </a>section, but several people I work with seemed to have a hard time.</p>
<div class="note">Tip: pressing the [F1] key brings up the Help menu in most Windows applications, including Office, Excel, and Word.</div>
<p><strong>Here are a few of the tasks I needed to find out how to do all over again.</strong></p>
<p><strong>Enable Macros</strong></p>
<p>In order to <a href="http://office.microsoft.com/en-us/excel/HA100310711033.aspx?pid=CH100648291033">enable macros</a>, <a href="http://office.microsoft.com/en-us/excel/HA100337761033.aspx">you have to use the new Security Center</a>. Of course, you have to FIND IT FIRST. You can get to that from the options, but I couldn&#8217;t find it, even though I was actively looking. I felt pretty silly when<strong> I finally found the options right down hiding in plain sight at the bottom of the main menu.</strong> <em>(Actually, the first time I used Excel 2007, I didn&#8217;t realize that little icon at the top left WAS a menu.)</em> Click the &#8220;pizza&#8221; to show the menu, and the options, along with the trust center settings, can be reached by clicking on the Excel Options button all the way at the bottom there.</p>
<p><img class="aligncenter size-full wp-image-964" title="exceloptions" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/exceloptions.jpg" alt="" width="400" height="400" /></p>
<p>Click on the Excel Options button, then Trust Center, then Trust Center Settings. Choose the option you wanted, either enabling or disabling macros.</p>
<p><img class="aligncenter size-full wp-image-965" title="excelmacros" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/excelmacros.jpg" alt="" width="450" height="547" /></p>
<p><strong>Data Validation with Lists</strong></p>
<p>I like having drop down lists in the cells when input should be within a certain set of values. It just makes my life easier. I use lists for project tracking sheets, priority GTD lists, even categories for my quotes in my quotes file. <a href="http://office.microsoft.com/en-us/excel/HP100726001033.aspx?pid=CH100648501033#4_1">They moved data validation to the Data Tab, Data Tools section</a>, as seen here.</p>
<p style="text-align: center;"><img class="size-full wp-image-966 aligncenter" title="excelvalidation" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/excelvalidation.jpg" alt="" width="500" height="92" /></p>
<p>Then you can choose your list like you normally would have. You can type in the values as a comma separated list, use a named range, or just a range of cells on the same sheet. I like named ranges because you can grab a range from a different sheet when you do that.</p>
<p><img class="aligncenter size-full wp-image-967" title="excellist" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/excellist.jpg" alt="" width="400" height="323" /></p>
<p><strong>Named Ranges</strong></p>
<p>Speaking of Named Ranges, I had to search for how to define those in Excel 2007. <a href="http://office.microsoft.com/en-us/excel/HA101471201033.aspx?pid=CH100648431033">It&#8217;s simpler now</a>. To define a named range, it&#8217;s right on the Formulas tab, in the Defined Names section.</p>
<p><img class="aligncenter size-full wp-image-968" title="excelranges" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/excelranges.jpg" alt="" width="500" height="468" /></p>
<p>See also:<br />
<a href="http://www.accountingweb.co.uk/cgi-bin/item.cgi?id=175623&amp;d=1032&amp;h=1033&amp;f=1026">New Range Name features in Excel 2007. By Simon Hurst</a><br />
<a href="http://www.accountingweb.co.uk/cgi-bin/item.cgi?id=29393&amp;d=1032&amp;h=1033&amp;f=1026">Excel Tip: 10 Quick Range Name Tricks </a></p>
<p> </p>
<p><strong>Create a Simple Pivot Table </strong></p>
<p><a href="http://office.microsoft.com/en-us/excel/HP100898931033.aspx?pid=CH101768451033">Pivot tables</a> are my friend. Again, though, you have to be able to find them to use them. They moved those to the Insert menu.</p>
<p><img class="aligncenter size-full wp-image-969" title="excelpivot" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/excelpivot.jpg" alt="" width="371" height="337" /></p>
<p>See <a href="http://office.microsoft.com/en-us/excel/results.aspx?qu=pivot+table&amp;sc=9&amp;av=ZXL120">the myriad number of articles on Pivot Tables over in the Help section</a> of Microsoft Office&#8217;s site for more fun with pivots.</p>
<p><strong>What did you have trouble finding in Excel 2007? Share your tips in the comments!</strong></p>
<p><strong><em>If you found this article helpful, please share it on your favorite bookmarking site. Thanks!</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/03/27/excel-2007-where-did-they-put-that/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Link Love</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/03/22/link-love-3/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/03/22/link-love-3/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 15:00:39 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[link love]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=944</guid>
		<description><![CDATA[Fun and interesting, and in no particular order.  
Handling Null Database Values Using Data Source Controls  - MSDN recommended way to handle NULL database values in SqlDataSource and the like.
Web Services Description Language Tool (Wsdl.exe) - this little gem saved my behind when Visual Studio couldn&#8217;t recover from someone&#8217;s port numbers in their wsdl using [...]]]></description>
			<content:encoded><![CDATA[<p><img style="padding: 5px;" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/linklove.jpg" alt="Link Love" width="150" height="100" align="left" /><strong>Fun and interesting, and in no particular order. </strong> </p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms366709(VS.85).aspx">Handling Null Database Values Using Data Source Controls </a> - MSDN recommended way to handle NULL database values in SqlDataSource and the like.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/7h3ystb6(VS.80).aspx">Web Services Description Language Tool (Wsdl.exe)</a> - this little gem saved my behind when Visual Studio couldn&#8217;t recover from someone&#8217;s port numbers in their wsdl using the Create Web Reference wizard. You can generate the class files using this tool by copying the offending wsdl, fixing it, and pointing wsdl.exe to the local copy.</p>
<p><a href="http://www.jroller.com/ladycoder/entry/developers_shouldl_not_design_products">Rude awakening</a> - A great point is made here about developers not understanding users. If only more designers sat with the people who had to use their stuff&#8230;</p>
<p><a title="Permanent Link to Stupid users are a myth" href="http://swizec.com/blog/stupid-users-are-a-myth/swizec/449">Stupid users are a myth</a> - another post about developers not understanding users, with emphasis on ignorance on knowing how to use something versus being honestly IQ challenged</p>
<p><a href="http://web-kreation.com/index.php/html-css/add-file-type-icons-next-to-your-links-with-css/">Add File Type Icons next to your links with CSS</a> - how to let users know the link is for a PDF, or is external, using only CSS</p>
<p><a href="http://softwarecreation.org/2009/how-to-become-an-expert-the-effective-way/">How to Become an Expert. The Effective Way.</a> - interesting article on how to be awesome. Includes a goal sheet.</p>
<p><strong>I&#8217;m thinking of trying to post Link Love every Sunday. Do you enjoy link posts and find them informative? Or would you rather I just post moar funny LOLcat pictures? Let me know in the comments!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/03/22/link-love-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Storing different types in System.Array</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/03/21/storing-different-types-in-systemarray/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/03/21/storing-different-types-in-systemarray/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 02:35:24 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[C#.NET]]></category>

		<category><![CDATA[stupid coding tricks]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=956</guid>
		<description><![CDATA[I came across a list of C# interview questions. One of them was asking if you could store multiple data types in System.Array. The answer given was &#8220;no&#8221;. However, that&#8217;s not entirely true.
You can indeed store pretty much anything you want if you declare an Array of type Object (or other shared base class). They [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a list of C# interview questions. One of them was asking if you could store multiple data types in System.Array. The answer given was &#8220;no&#8221;. However, that&#8217;s not <em>entirely </em>true.</p>
<p><strong>You can indeed store pretty much anything you want if you declare an Array of type Object</strong> (or other shared base class). They will be stored as that base class, but their real type is maintained.</p>
<p>See sample code:</p>
<pre name="code" class="csharp">

            object[] a = new object[10];
            int j = 1;
            a[0] = j;
            string s = &quot;foo&quot;;
            a[1] = s;
            bool b = true;
            a[2] = b;
 
            for (int i = 0; i &lt; a.Length; i++ )
            {
                object o = a[i];
                if (o != null) Console.WriteLine(o.GetType().ToString());
            }
          
</pre>
<p>Written to the console will be the actual types of the objects. You can use the &#8220;is&#8221; operator to check the type of the object before casting it or trying to use it.</p>
<pre name="code" class="csharp">

            for (int i = 0; i &lt; a.Length; i++ )
            {
                object o = a[i];
                if (o != null)
                {
                    if (o is string) Console.WriteLine(o);
                }
            }
</pre>
<div class="note">You don&#8217;t have to use Object if the classes you are going to be storing share a parent class. Use whatever the first shared parent class happens to be. </div>
<p><strong>This technique has limited real-world application.</strong> If you need to do something like this, seriously think about your design and why you think you need it. Why do you need an Array, and why are you storing a bunch of different types in it? <a href="http://msdn.microsoft.com/en-us/magazine/cc301755.aspx">Here is an example, right from MSDN, where they are storing various Controls in an Array.</a></p>
<p><strong>Was this interesting? Please share it! I need all the friends I can get.  =)</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/03/21/storing-different-types-in-systemarray/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mysterious 404 with ASP</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/03/16/mysterious-404-with-asp/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/03/16/mysterious-404-with-asp/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 02:49:37 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<category><![CDATA[Classic ASP]]></category>

		<category><![CDATA[IIS]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=942</guid>
		<description><![CDATA[It has been quite some time since I&#8217;ve had to play with a fresh install of IIS 6.0 and Classic ASP. We recently added a test server to our environment, but it had to be loaded with some legacy code. I created the directory, copied the files, and created the website in IIS as I [...]]]></description>
			<content:encoded><![CDATA[<p>It has been quite some time since I&#8217;ve had to play with a fresh install of <strong>IIS 6.0 and Classic ASP</strong>. We recently added a test server to our environment, but it had to be loaded with some legacy code. I created the directory, copied the files, and created the website in IIS as I was used to doing. I shared the folder and all that. Yet when i tried to bring the site up in my browser, the files were 404. <strong>How could they be 404 when I was looking right at them in Explorer?</strong> I was mightily confused. I carefully compared settings, shares, and everything. It all seemed just fine. For grins, I enabled directory browsing, and I could even browse the site&#8217;s html and jpg files. it was only when I clicked an ASP page that I got an error.</p>
<p>So, of course, I Googled, and came up with this.</p>
<p><a href="http://support.microsoft.com/kb/315122">&#8220;HTTP Error 404 - File or Directory not found&#8221; error message when you request dynamic content with IIS 6.0</a></p>
<p>I realized I had never been the first to set up websites on a box before. Sure enough, no one had remembered to set up IIS for Classic ASP because most of our stuff uses .NET now. When I opened the Web service extensions module, nothing was set up. I followed these steps as outlined in the KB and it fixed my odd little &#8220;problem&#8221;.</p>
<p><strong>Enable a Pre-existing Web Service Extension in IIS 6.0 </strong></p>
<p>To permit IIS to serve content that requires a specific ISAPI or CGI extension that is already listed in the Web service extensions list, follow these steps:</p>
<ol>
<li>Open IIS Manager, expand the master server node (that is, the Servername node), and then select the Web service extensions node.</li>
<li>In the right pane of IIS Manager, right-click the extension that you want to enable. In this example, this is Active Server Pages.</li>
<li>Click to select the Allow check box.</li>
</ol>
<p>Ah, the fun we have with old legacy applications!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/03/16/mysterious-404-with-asp/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Time for another link love post</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/03/15/time-for-another-link-love-post/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/03/15/time-for-another-link-love-post/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 16:00:37 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=936</guid>
		<description><![CDATA[Because I read a lot, and like to share. Some interestingness, in no particular order.
5 IIS 7 Features Every Web Developer Should Know
What&#8217;s the difference between CONST and READONLY in .Net?
20 Wordpress Hacks That Will Help You (or else)
Sharpening the Saw
]]></description>
			<content:encoded><![CDATA[<p>Because I read a lot, and like to share. Some interestingness, in no particular order.</p>
<p><a href="http://httpcode.com/blogs/PermaLink,guid,fd600295-d164-4583-adc0-f7ee2b90483b.aspx">5 IIS 7 Features Every Web Developer Should Know</a></p>
<p><a href="http://www.carlj.ca/2009/03/09/whats-the-difference-between-const-and-readonly-in-net/">What&#8217;s the difference between CONST and READONLY in .Net?</a></p>
<p><a href="http://viciousduck.org/20-wordpress-hacks-that-will-help-you-or-else">20 Wordpress Hacks That Will Help You (or else)</a></p>
<p><a href="http://www.codinghorror.com/blog/archives/001236.html">Sharpening the Saw</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/03/15/time-for-another-link-love-post/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Happy Caturday!</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/03/14/happy-caturday-2/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/03/14/happy-caturday-2/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 14:50:05 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Cats]]></category>

		<category><![CDATA[caturday]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=848</guid>
		<description><![CDATA[I wear the cheese, it does not wear me&#8230;oh, wait.

Originally posted on cat_macros

Another one found at cat_macros


more animals

see more Lolcats and funny pictures
]]></description>
			<content:encoded><![CDATA[<p><strong>I wear the cheese, it does not wear me&#8230;oh, wait.</strong></p>
<p><a href="http://www.stuffonmycat.com/Misc.-On-My-Cat/20090130-littlebear2.html"><img src="http://www.stuffonmycat.com/images/stories/20090130_littlebear2.jpg" alt="" /></a></p>
<p>Originally posted on <a href="http://community.livejournal.com/cat_macros/5010158.html?view=41838318">cat_macros</a></p>
<p><a href="http://smg.photobucket.com/albums/v197/kaeli/?action=view&amp;current=sure2.jpg" target="_blank"><img src="http://img.photobucket.com/albums/v197/kaeli/sure2.jpg" border="0" alt="Photobucket" /></a></p>
<p>Another one found at <a href="http://community.livejournal.com/cat_macros/5013747.html">cat_macros</a></p>
<p><a href="http://smg.photobucket.com/albums/v197/kaeli/?action=view&amp;current=downput.jpg" target="_blank"><img src="http://img.photobucket.com/albums/v197/kaeli/downput.jpg" border="0" alt="Photobucket" /></a></p>
<p><a href="http://icanhascheezburger.com/2009/02/27/funny-pictures-fun-but-it-not/"><img class="mine_3362822" title="funny-pictures-kitten-does-not-find-hamster-ball-fun" src="http://icanhascheezburger.wordpress.com/files/2009/02/funny-pictures-kitten-does-not-find-hamster-ball-fun.jpg" alt="funny pictures of cats with captions" /></a><br />
more <a href="http://icanhascheezburger.com">animals</a></p>
<p><a href="http://icanhascheezburger.com/2009/03/11/funny-pictures-holding-hands-and-smiling/"><img class="mine_3485837" title="funny-pictures-csi-cat-studies-the-body-outlines" src="http://icanhascheezburger.wordpress.com/files/2009/03/funny-pictures-csi-cat-studies-the-body-outlines.jpg" alt="funny pictures of cats with captions" /></a><br />
see more <a href="http://icanhascheezburger.com">Lolcats and funny pictures</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/03/14/happy-caturday-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using CustomValidator To Validate CheckBoxes</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/03/04/using-customvalidator-to-validate-checkboxes/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/03/04/using-customvalidator-to-validate-checkboxes/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 02:37:22 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[CheckBox]]></category>

		<category><![CDATA[CustomValidator]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=933</guid>
		<description><![CDATA[For your viewing pleasure, a quick and dirty example of using a CustomValidator to check that there is at least one CheckBox checked, but no more than 3 CheckBoxes are checked. This example uses both client-side validation and server side validation.
The ASPX:


&#60;%@ Page Language=&#34;C#&#34; AutoEventWireup=&#34;true&#34; CodeFile=&#34;CustomValidatorCheckbox.aspx.cs&#34; Inherits=&#34;CustomValidatorCheckbox&#34; %&#62;
&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62;
&#60;html [...]]]></description>
			<content:encoded><![CDATA[<p>For your viewing pleasure, a quick and dirty example of using a <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.customvalidator(VS.80).aspx">CustomValidator </a>to check that there is at least one CheckBox checked, but no more than 3 CheckBoxes are checked. This example uses both client-side validation and server side validation.</p>
<p><strong>The ASPX:</strong></p>
<pre name="code" class="csharp">

&lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;CustomValidatorCheckbox.aspx.cs&quot; Inherits=&quot;CustomValidatorCheckbox&quot; %&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head runat=&quot;server&quot;&gt;
    &lt;title&gt;Custom Validator - max number of checked items&lt;/title&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
    function petValidate(sender, args)
    {
        var count = 0;
        var values = new Array(
            document.getElementById(&#039;ckDog&#039;).checked, 
            document.getElementById(&#039;ckCat&#039;).checked, 
            document.getElementById(&#039;ckBird&#039;).checked, 
            document.getElementById(&#039;ckFerret&#039;).checked, 
            document.getElementById(&#039;ckOther&#039;).checked);
        for (var i = 0; i &lt; values.length; i++) 
        {
            count += values[i] ? 1 : 0;
        }
        args.IsValid = (count &gt; 0 &amp;amp;&amp;amp; count &lt;= 3);
    }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
    &lt;div&gt;
        Custom Validator Example&lt;br /&gt;
        &lt;br /&gt;
        Pet(s): (select up to 3)
        &lt;br /&gt;
        &lt;asp:CustomValidator ID=&quot;cvPetValidator&quot; runat=&quot;server&quot; Display=&quot;Dynamic&quot; ErrorMessage=&quot;You must choose at least one and no more than 3 pets.&quot;
            OnServerValidate=&quot;cvPetValidator_ServerValidate&quot; ClientValidationFunction=&quot;petValidate&quot;&gt;&lt;/asp:CustomValidator&gt;&lt;br /&gt;
        &lt;asp:CheckBox ID=&quot;ckDog&quot; runat=&quot;server&quot; CausesValidation=&quot;True&quot; Text=&quot;Dog&quot; /&gt;&lt;br /&gt;
        &lt;asp:CheckBox ID=&quot;ckCat&quot; runat=&quot;server&quot; CausesValidation=&quot;True&quot; Text=&quot;Cat&quot; /&gt;&lt;br /&gt;
        &lt;asp:CheckBox ID=&quot;ckBird&quot; runat=&quot;server&quot; CausesValidation=&quot;True&quot; Text=&quot;Bird&quot; /&gt;&lt;br /&gt;
        &lt;asp:CheckBox ID=&quot;ckFerret&quot; runat=&quot;server&quot; CausesValidation=&quot;True&quot; Text=&quot;Ferret&quot; /&gt;&lt;br /&gt;
        &lt;asp:CheckBox ID=&quot;ckOther&quot; runat=&quot;server&quot; CausesValidation=&quot;True&quot; Text=&quot;Other&quot; /&gt;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;asp:Button ID=&quot;brtSubmit&quot; runat=&quot;server&quot; Text=&quot;Submit&quot; /&gt;&lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><strong>The Code Behind:</strong></p>
<pre name="code" class="csharp">

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class CustomValidatorCheckbox : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void cvPetValidator_ServerValidate(object source, ServerValidateEventArgs args)
    {
        int count = 0;
        bool[] values = new bool[] {
            ckDog.Checked, 
            ckCat.Checked, 
            ckBird.Checked, 
            ckFerret.Checked, 
            ckOther.Checked};
 
        foreach (bool b in values) count += b ? 1 : 0;

        args.IsValid = (count &gt; 0 &amp;amp;&amp;amp; count &lt;= 3);
    }
}
</pre>
<p>Note that the client-side javascript is assuming that the controls actually have those IDs. Depending on the structure of your page, they may get renamed due to NamingContainer conflicts. If that happens, you&#8217;ll want to set out the script to use the real client ids of the controls instead, like so:</p>
<p>document.getElementById(&#8217;<strong>&lt;%= ckDog.ClientID %&gt;</strong>&#8216;).checked</p>
<p>I&#8217;ve seen a lot of confusion over validating checkboxes, so hopefully this helps someone. Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/03/04/using-customvalidator-to-validate-checkboxes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GridView Full Example</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/03/03/gridview-full-example/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/03/03/gridview-full-example/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 02:37:52 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[GridView]]></category>

		<category><![CDATA[Newbie Geek]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=922</guid>
		<description><![CDATA[I decided to post a basic example of creating a GridView with in-place editing and deleting, with drop down lists for the ID fields, using SqlDataSources for them. Sorting and paging are supported. Inserting is not. No styles are applied or anything, and all paging/sorting is done the default way, on the client (that means [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to post a basic example of creating a <strong>GridView with in-place editing and deleting, with drop down lists for the ID fields, using SqlDataSources</strong> for them. Sorting and paging are supported. Inserting is not. No styles are applied or anything, and all paging/sorting is done the default way, on the client (that means it&#8217;s not a great way to do things for large datasets). If this were a live site, I would also configure caching for the data sources for the suppliers and categories, as they wouldn&#8217;t be changing a lot.</p>
<div class="note">For this example, you will need the Northwind database and a connection string in your web config. Also, I assume you&#8217;re using Visual Studio 2005 with .NET 2.0.</div>
<p>Here is what the page looks like when you run it (remember, no styling, it&#8217;s ugly). Click the thumbnails for the big pictures.</p>
<div id="attachment_923" class="wp-caption alignnone" style="width: 160px"><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex1.jpg"><img class="size-thumbnail wp-image-923" title="gridviewex1" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex1-150x150.jpg" alt="GridView Ex 1" width="150" height="150" /></a><p class="wp-caption-text">GridView Ex 1</p></div>
<p><span id="more-922"></span>When you click the Edit link button, the DropDownLists for the 2 ID fields are populated and the current selection is chosen, as you can see here.</p>
<div id="attachment_924" class="wp-caption alignnone" style="width: 160px"><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex2.jpg"><img class="size-thumbnail wp-image-924" title="gridviewex2" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex2-150x150.jpg" alt="GridView Ex 2" width="150" height="150" /></a><p class="wp-caption-text">GridView Ex 2</p></div>
<p>Now, for the <strong>Northwind </strong>database, we have one issue with those drop down lists. The corresponding fields in the database can be null, as you can see if you check it out with Sql Server. You will see how we handle this a little later. For now, just keep it in mind.</p>
<div id="attachment_925" class="wp-caption alignnone" style="width: 160px"><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex3.jpg"><img class="size-thumbnail wp-image-925" title="gridviewex3" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex3-150x150.jpg" alt="Grid View Ex 3" width="150" height="150" /></a><p class="wp-caption-text">Grid View Ex 3</p></div>
<p><strong>To create our example, we will do the following:</strong></p>
<ol>
<li>Create the ASPX page and add the SqlDataSource for the Products table</li>
<li>Drag a GridView onto the page and set it to that data source.</li>
<li>Configure the GridView to allow editing, deleting, paging, and sorting, and set the autogenerate edit and delete buttons on.</li>
<li>Turn off autogenerate fields and use bound fields for most of them, but convert the ID fields to template fields. If it added the extra command field on you, remove it.</li>
<li>Edit the ItemTemplate and EditItemTemplate for the supplier and category fields so they use an sql data source and drop down lists.</li>
</ol>
<p>That&#8217;s the gist of it. The tricky part is #5. When you are editing the templates, you add an SqlDataSource to it that grabs the necessary data. You then set your drop down list to pull the items from there while actually binding to the main data source. The reason I choose to use a disabled dropdown list for the ItemTemplate is because it is so much easier than any other control to do this with. If you were to apply styles, you could make it look far more visually appealing.<br />
Here is what it looks like in Visual Studio when you edit the template for the lists. You bring up the template and pop an SqlDataSource in there and configure it to pull from the table (for example, the supplier list). Then you add a dropdown and configure it.  </p>
<div id="attachment_926" class="wp-caption alignnone" style="width: 160px"><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex4.jpg"><img class="size-thumbnail wp-image-926" title="gridviewex4" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex4-150x150.jpg" alt="GridView Ex 4" width="150" height="150" /></a><p class="wp-caption-text">GridView Ex 4</p></div>
<p>Choose the Configure Data Source option and point it to the supplier data source.</p>
<div id="attachment_927" class="wp-caption alignnone" style="width: 160px"><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex5.jpg"><img class="size-thumbnail wp-image-927" title="gridviewex5" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex5-150x150.jpg" alt="Grid View Ex 5" width="150" height="150" /></a><p class="wp-caption-text">Grid View Ex 5</p></div>
<p>Then you go back and choose Edit Data Bindings, and tell it to bind to the main data source&#8217;s supplier ID field. For the ItemTemplate, you can uncheck the two way binding box, but for the EditItemTemplate, make sure it&#8217;s checked.</p>
<div id="attachment_928" class="wp-caption alignnone" style="width: 160px"><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex6.jpg"><img class="size-thumbnail wp-image-928" title="gridviewex6" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/03/gridviewex6-150x150.jpg" alt="Grid View Ex 6" width="150" height="150" /></a><p class="wp-caption-text">Grid View Ex 6</p></div>
<p><strong>Now,</strong> <strong>remember how I mentioned that the fields allow nulls in the database</strong>? That means if any of them are null and you don&#8217;t account for it, you&#8217;ll get a fun data binding error when it tries to find a matching item in the dropdown and cannot. The error will be similar to <em>&#8216;DropDownList2&#8242; has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value.</em> To remedy that, we need to make sure there is an item in the list that is a placeholder for null. For the drop down lists, we will set their AppendDataboundItems properties to True and add a list item at the beginning that has text but no value.</p>
<p>This may seem complicated if you are new to .NET, but once you get the hang of it, it goes quickly. It took me longer to screen capture and crop the images for this post and write it up than to get the code working.<br />
Here is the full markup. There is no code behind, it&#8217;s all in the ASPX.</p>
<pre name="code" class="csharp">
&lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;GridViewExample.aspx.cs&quot; Inherits=&quot;GridViewExample&quot; %&gt;

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head runat=&quot;server&quot;&gt;
    &lt;title&gt;Basic GridView Example&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
    &lt;div&gt;
        &lt;asp:SqlDataSource ID=&quot;SqlDataSource1&quot; runat=&quot;server&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:NorthwindConnectionString %&gt;&quot;
            DeleteCommand=&quot;DELETE FROM [Products] WHERE [ProductID] = @ProductID&quot; InsertCommand=&quot;INSERT INTO [Products] ([ProductName], [SupplierID], [CategoryID], [QuantityPerUnit], [UnitPrice], [UnitsInStock], [UnitsOnOrder], [ReorderLevel], [Discontinued]) VALUES (@ProductName, @SupplierID, @CategoryID, @QuantityPerUnit, @UnitPrice, @UnitsInStock, @UnitsOnOrder, @ReorderLevel, @Discontinued)&quot;
            SelectCommand=&quot;SELECT [ProductID], [ProductName], [SupplierID], [CategoryID], [QuantityPerUnit], [UnitPrice], [UnitsInStock], [UnitsOnOrder], [ReorderLevel], [Discontinued] FROM [Products]&quot;
            UpdateCommand=&quot;UPDATE [Products] SET [ProductName] = @ProductName, [SupplierID] = @SupplierID, [CategoryID] = @CategoryID, [QuantityPerUnit] = @QuantityPerUnit, [UnitPrice] = @UnitPrice, [UnitsInStock] = @UnitsInStock, [UnitsOnOrder] = @UnitsOnOrder, [ReorderLevel] = @ReorderLevel, [Discontinued] = @Discontinued WHERE [ProductID] = @ProductID&quot;&gt;
            &lt;DeleteParameters&gt;
                &lt;asp:Parameter Name=&quot;ProductID&quot; Type=&quot;Int32&quot; /&gt;
            &lt;/DeleteParameters&gt;
            &lt;UpdateParameters&gt;
                &lt;asp:Parameter Name=&quot;ProductName&quot; Type=&quot;String&quot; /&gt;
                &lt;asp:Parameter Name=&quot;SupplierID&quot; Type=&quot;Int32&quot; /&gt;
                &lt;asp:Parameter Name=&quot;CategoryID&quot; Type=&quot;Int32&quot; /&gt;
                &lt;asp:Parameter Name=&quot;QuantityPerUnit&quot; Type=&quot;String&quot; /&gt;
                &lt;asp:Parameter Name=&quot;UnitPrice&quot; Type=&quot;Decimal&quot; /&gt;
                &lt;asp:Parameter Name=&quot;UnitsInStock&quot; Type=&quot;Int16&quot; /&gt;
                &lt;asp:Parameter Name=&quot;UnitsOnOrder&quot; Type=&quot;Int16&quot; /&gt;
                &lt;asp:Parameter Name=&quot;ReorderLevel&quot; Type=&quot;Int16&quot; /&gt;
                &lt;asp:Parameter Name=&quot;Discontinued&quot; Type=&quot;Boolean&quot; /&gt;
                &lt;asp:Parameter Name=&quot;ProductID&quot; Type=&quot;Int32&quot; /&gt;
            &lt;/UpdateParameters&gt;
            &lt;InsertParameters&gt;
                &lt;asp:Parameter Name=&quot;ProductName&quot; Type=&quot;String&quot; /&gt;
                &lt;asp:Parameter Name=&quot;SupplierID&quot; Type=&quot;Int32&quot; /&gt;
                &lt;asp:Parameter Name=&quot;CategoryID&quot; Type=&quot;Int32&quot; /&gt;
                &lt;asp:Parameter Name=&quot;QuantityPerUnit&quot; Type=&quot;String&quot; /&gt;
                &lt;asp:Parameter Name=&quot;UnitPrice&quot; Type=&quot;Decimal&quot; /&gt;
                &lt;asp:Parameter Name=&quot;UnitsInStock&quot; Type=&quot;Int16&quot; /&gt;
                &lt;asp:Parameter Name=&quot;UnitsOnOrder&quot; Type=&quot;Int16&quot; /&gt;
                &lt;asp:Parameter Name=&quot;ReorderLevel&quot; Type=&quot;Int16&quot; /&gt;
                &lt;asp:Parameter Name=&quot;Discontinued&quot; Type=&quot;Boolean&quot; /&gt;
            &lt;/InsertParameters&gt;
        &lt;/asp:SqlDataSource&gt;
    &lt;/div&gt;
        &lt;asp:GridView ID=&quot;GridView1&quot; runat=&quot;server&quot; AllowPaging=&quot;True&quot; AllowSorting=&quot;True&quot;
            AutoGenerateColumns=&quot;False&quot; AutoGenerateDeleteButton=&quot;True&quot; AutoGenerateEditButton=&quot;True&quot;
            DataKeyNames=&quot;ProductID&quot; DataSourceID=&quot;SqlDataSource1&quot;&gt;
            &lt;Columns&gt;
                &lt;asp:BoundField DataField=&quot;ProductID&quot; HeaderText=&quot;ProductID&quot; InsertVisible=&quot;False&quot;
                    ReadOnly=&quot;True&quot; SortExpression=&quot;ProductID&quot; Visible=&quot;False&quot; /&gt;
                &lt;asp:BoundField DataField=&quot;ProductName&quot; HeaderText=&quot;Product Name&quot; SortExpression=&quot;ProductName&quot; /&gt;
                &lt;asp:TemplateField HeaderText=&quot;Supplier&quot; SortExpression=&quot;SupplierID&quot;&gt;
                    &lt;EditItemTemplate&gt;&lt;asp:DropDownList ID=&quot;DropDownList1&quot; runat=&quot;server&quot; DataSourceID=&quot;sqldsSupplier&quot;
                            DataTextField=&quot;CompanyName&quot; DataValueField=&quot;SupplierID&quot; SelectedValue=&#039;&lt;%# Bind(&quot;SupplierID&quot;) %&gt;&#039; AppendDataBoundItems=&quot;True&quot;&gt;
                        &lt;asp:ListItem Selected=&quot;True&quot; Text=&quot;-- select an item --&quot; Value=&quot;&quot; /&gt;
                    &lt;/asp:DropDownList&gt;
                        &lt;asp:SqlDataSource ID=&quot;sqldsSupplier&quot; runat=&quot;server&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:NorthwindConnectionString %&gt;&quot;
                            SelectCommand=&quot;SELECT [CompanyName], [SupplierID] FROM [Suppliers] ORDER BY [CompanyName]&quot;&gt;
                        &lt;/asp:SqlDataSource&gt;
                    &lt;/EditItemTemplate&gt;
                    &lt;ItemTemplate&gt;
                        &amp;amp;nbsp;
                        &lt;asp:DropDownList ID=&quot;DropDownList1&quot; runat=&quot;server&quot; DataSourceID=&quot;sqldsSupplier&quot;
                            DataTextField=&quot;CompanyName&quot; DataValueField=&quot;SupplierID&quot; Enabled=&quot;False&quot; SelectedValue=&#039;&lt;%# Eval(&quot;SupplierID&quot;) %&gt;&#039; AppendDataBoundItems=&quot;True&quot;&gt;
                            &lt;asp:ListItem Selected=&quot;True&quot; Text=&quot;-- select an item --&quot; Value=&quot;&quot; /&gt;
                        &lt;/asp:DropDownList&gt;
                        &lt;asp:SqlDataSource ID=&quot;sqldsSupplier&quot; runat=&quot;server&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:NorthwindConnectionString %&gt;&quot;
                            SelectCommand=&quot;SELECT [CompanyName], [SupplierID] FROM [Suppliers] ORDER BY [CompanyName]&quot;&gt;&lt;/asp:SqlDataSource&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:TemplateField HeaderText=&quot;CategoryID&quot; SortExpression=&quot;CategoryID&quot;&gt;
                    &lt;EditItemTemplate&gt;
                        &amp;amp;nbsp;&lt;asp:DropDownList ID=&quot;DropDownList2&quot; runat=&quot;server&quot; DataSourceID=&quot;sqldsCategories&quot;
                            DataTextField=&quot;CategoryName&quot; DataValueField=&quot;CategoryID&quot; SelectedValue=&#039;&lt;%# Bind(&quot;CategoryID&quot;) %&gt;&#039; AppendDataBoundItems=&quot;True&quot;&gt;
                            &lt;asp:ListItem Selected=&quot;True&quot; Text=&quot;-- select an item --&quot; Value=&quot;&quot; /&gt;
                        &lt;/asp:DropDownList&gt;
                        &lt;asp:SqlDataSource ID=&quot;sqldsCategories&quot; runat=&quot;server&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:NorthwindConnectionString %&gt;&quot;
                            SelectCommand=&quot;SELECT [CategoryID], [CategoryName] FROM [Categories] ORDER BY [CategoryName]&quot;&gt;
                        &lt;/asp:SqlDataSource&gt;
                    &lt;/EditItemTemplate&gt;
                    &lt;ItemTemplate&gt;
                        &amp;amp;nbsp;&lt;asp:DropDownList ID=&quot;DropDownList2&quot; runat=&quot;server&quot; DataSourceID=&quot;sqldsCategories&quot;
                            DataTextField=&quot;CategoryName&quot; DataValueField=&quot;CategoryID&quot; Enabled=&quot;False&quot; SelectedValue=&#039;&lt;%# Eval(&quot;CategoryID&quot;) %&gt;&#039; AppendDataBoundItems=&quot;True&quot;&gt;
                        &lt;/asp:DropDownList&gt;
                        &lt;asp:SqlDataSource ID=&quot;sqldsCategories&quot; runat=&quot;server&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:NorthwindConnectionString %&gt;&quot;
                            SelectCommand=&quot;SELECT [CategoryID], [CategoryName] FROM [Categories] ORDER BY [CategoryName]&quot;&gt;
                        &lt;/asp:SqlDataSource&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:BoundField DataField=&quot;QuantityPerUnit&quot; HeaderText=&quot;Quantity Per Unit&quot; SortExpression=&quot;QuantityPerUnit&quot; /&gt;
                &lt;asp:BoundField DataField=&quot;UnitPrice&quot; HeaderText=&quot;Unit Price&quot; SortExpression=&quot;UnitPrice&quot; /&gt;
                &lt;asp:BoundField DataField=&quot;UnitsInStock&quot; HeaderText=&quot;Units In Stock&quot; SortExpression=&quot;UnitsInStock&quot; /&gt;
                &lt;asp:BoundField DataField=&quot;UnitsOnOrder&quot; HeaderText=&quot;Units On Order&quot; SortExpression=&quot;UnitsOnOrder&quot; /&gt;
                &lt;asp:BoundField DataField=&quot;ReorderLevel&quot; HeaderText=&quot;Reorder Level&quot; SortExpression=&quot;ReorderLevel&quot; /&gt;
                &lt;asp:TemplateField HeaderText=&quot;Discontinued&quot; SortExpression=&quot;Discontinued&quot;&gt;
                    &lt;EditItemTemplate&gt;
                        &lt;asp:CheckBox ID=&quot;CheckBox1&quot; runat=&quot;server&quot; Checked=&#039;&lt;%# Bind(&quot;Discontinued&quot;) %&gt;&#039; /&gt;
                    &lt;/EditItemTemplate&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:CheckBox ID=&quot;CheckBox1&quot; runat=&quot;server&quot; Checked=&#039;&lt;%# Bind(&quot;Discontinued&quot;) %&gt;&#039;
                            Enabled=&quot;false&quot; /&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
            &lt;/Columns&gt;
        &lt;/asp:GridView&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;div&gt;
</pre>
<p><strong>I don&#8217;t usually post full examples with images and everything, so please let me know in the comments if you like it or if I should explain better, or if I should make more posts like this. </strong><br />
<strong>If you found this post helpful, please share it on Digg or your favorite social site. I&#8217;d appreciate it.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/03/03/gridview-full-example/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Link Love</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/02/28/link-love-2/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/02/28/link-love-2/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 13:35:50 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=909</guid>
		<description><![CDATA[Some interesting stuff I&#8217;ve seen lately, in no particular order. Check them out.
10 things a web designer would never tell you
How To Introduce Something New At Work
Real Ultimate Programming Power
Top 50 WordPress Tutorials
]]></description>
			<content:encoded><![CDATA[<p>Some interesting stuff I&#8217;ve seen lately, in no particular order. Check them out.</p>
<p><a href="http://boagworld.com/design/10_things_a_web_designer_would/">10 things a web designer would never tell you</a></p>
<p><a href="http://www.allthingsworkplace.com/2009/02/how-to-introduce-something-new-at-work.html">How To Introduce Something New At Work</a></p>
<p><a href="http://www.codinghorror.com/blog/archives/000856.html">Real Ultimate Programming Power</a></p>
<p><a href="http://net.tutsplus.com/articles/web-roundups/top-50-wordpress-tutorials/">Top 50 WordPress Tutorials</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/02/28/link-love-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ASP.NET Web Parts 101</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/02/24/aspnet-web-parts-101/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/02/24/aspnet-web-parts-101/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 02:48:06 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[.NET]]></category>

		<category><![CDATA[Web Parts]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=911</guid>
		<description><![CDATA[I&#8217;ve been studying for the Exam 70-528 as part of the MCTS certification, and one of the sections on the exam is Web Parts. I&#8217;ve never worked with them before, so I&#8217;ve been checking out the walkthrough and other documentation and playing with the controls.
Since the walkthrough was too vanilla, but the big how-to on connections [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been studying for the Exam <strong>70-528</strong> as part of the <a href="http://www.microsoft.com/learning/mcp/mcts/webapps/default.mspx">MCTS certification</a>, and one of the sections on the exam is <strong>Web Parts</strong>. I&#8217;ve never worked with them before, so I&#8217;ve been checking out the <a href="http://msdn.microsoft.com/en-us/library/sk23dydw(VS.80).aspx">walkthrough</a> and other <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.connectionpoint(VS.80).aspx">documentation</a> and <a href="http://msdn.microsoft.com/en-us/library/ms178188(VS.80).aspx">playing with the controls</a>.</p>
<p>Since the <a href="http://msdn.microsoft.com/en-us/library/sk23dydw(VS.80).aspx">walkthrough</a> was too vanilla, but <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.connectionpoint(VS.80).aspx">the big how-to on connections</a> was way more than I wanted to start, I ended up with a nice small example of how to connect two web part controls to each other simply with a static connection. <strong>A master-detail list</strong>, if you will.</p>
<p>I&#8217;m posting this here in case anyone else would like a <strong>simple example to start off on Web Parts with</strong>. It uses two small user controls to grab orders and details from Northwind, and when you click on an order, the details show up. There&#8217;s no styling or anything, I was working on just getting the details GridView to load from the orders GridView&#8217;s selected item.</p>
<div class="note">In order to run this example, you will need SQL Server Express installed and Northwind set up. Change your connection to Northwind as appropriate.</div>
<p>Click the thumbnail to see what it looks like in the browser:</p>
<div id="attachment_912" class="wp-caption alignnone" style="width: 160px"><a href="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/02/webparts.jpg" target="_blank"><img class="size-thumbnail wp-image-912" title="webparts" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/02/webparts-150x150.jpg" alt="Screen Capture Of Web Parts Demo" width="150" height="150" /></a><p class="wp-caption-text">Screen Capture Of Web Parts Demo</p></div>
<p><strong>In short, the following steps were needed to create 2 web parts that talked to each other as master/detail:</strong><br />
 </p>
<ol>
<li>Create an Orders control that has a GridView of all orders.</li>
<li>Expose a method to give out the selected order. Decorate it as a provider.</li>
<li>Create a Details control that has a GridView with order details.</li>
<li>Expose a method to consume a selected order. Decorate it as a consumer.</li>
<li>Create the main page that uses the controls, and add web parts to it. Set the Orders and Details controls as the parts.</li>
<li>Pop the static connection into the web part manager.</li>
</ol>
<div>That was it, really. Took me about 40 minutes, and this was the first I have touched web parts. Here is the code I ended up with.</div>
<p><strong>OrderDetail.ascx</strong></p>
<pre name="code" class="csharp">

&lt;%@ Control Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;OrderDetail.ascx.cs&quot; Inherits=&quot;OrderDetail&quot; %&gt;
&amp;amp;amp;nbsp;&lt;asp:GridView ID=&quot;GridView1&quot; runat=&quot;server&quot; AutoGenerateColumns=&quot;False&quot; DataSourceID=&quot;SqlDataSource1&quot;&gt;
    &lt;Columns&gt;
        &lt;asp:BoundField DataField=&quot;ProductName&quot; HeaderText=&quot;ProductName&quot; SortExpression=&quot;ProductName&quot; /&gt;
        &lt;asp:BoundField DataField=&quot;UnitPrice&quot; HeaderText=&quot;UnitPrice&quot; SortExpression=&quot;UnitPrice&quot; /&gt;
        &lt;asp:BoundField DataField=&quot;Quantity&quot; HeaderText=&quot;Quantity&quot; SortExpression=&quot;Quantity&quot; /&gt;
        &lt;asp:BoundField DataField=&quot;Discount&quot; HeaderText=&quot;Discount&quot; SortExpression=&quot;Discount&quot; /&gt;
    &lt;/Columns&gt;
&lt;/asp:GridView&gt;
&lt;asp:SqlDataSource ID=&quot;SqlDataSource1&quot; runat=&quot;server&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:NorthwindConnectionString %&gt;&quot;
    SelectCommand=&quot;SELECT Products.ProductName, [Order Details].UnitPrice, [Order Details].Quantity, [Order Details].Discount FROM [Order Details] INNER JOIN Products ON [Order Details].ProductID = Products.ProductID WHERE [Order Details].OrderID=@OrderID ORDER BY Products.ProductName &quot;&gt;
    &lt;SelectParameters&gt;
        &lt;asp:Parameter DefaultValue=&quot;&quot; Name=&quot;OrderID&quot; /&gt;
    &lt;/SelectParameters&gt;
&lt;/asp:SqlDataSource&gt;
</pre>
<p><strong>OrderDetail.ascx.cs</strong></p>
<pre name="code" class="csharp">

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
 
public partial class OrderDetail : System.Web.UI.UserControl
{
    [ConnectionConsumer (&quot;Order ID Consumer&quot;, &quot;OrderIdConsumer&quot;)]
    public void OrderId(Int32 orderId)
    {
        SqlDataSource1.SelectParameters[&quot;OrderID&quot;].DefaultValue = orderId.ToString();
        DataBind();
    }

    protected void Page_Load(object sender, EventArgs e)
    {
    }
}
</pre>
<p><strong>NorthwindOrders.ascx</strong></p>
<pre name="code" class="csharp">

&lt;%@ Control Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;NorthwindOrders.ascx.cs&quot; Inherits=&quot;NorthwindOrders&quot; %&gt;
&lt;asp:GridView ID=&quot;GridView1&quot; runat=&quot;server&quot; AllowPaging=&quot;True&quot; AutoGenerateColumns=&quot;False&quot;
    AutoGenerateSelectButton=&quot;True&quot; DataKeyNames=&quot;OrderID&quot; DataSourceID=&quot;SqlDataSource1&quot;
    OnSelectedIndexChanged=&quot;GridView1_SelectedIndexChanged&quot;&gt;
    &lt;Columns&gt;
        &lt;asp:BoundField DataField=&quot;CompanyName&quot; HeaderText=&quot;CompanyName&quot; SortExpression=&quot;CompanyName&quot; /&gt;
        &lt;asp:BoundField DataField=&quot;OrderDate&quot; HeaderText=&quot;OrderDate&quot; SortExpression=&quot;OrderDate&quot; /&gt;
        &lt;asp:BoundField DataField=&quot;ShipName&quot; HeaderText=&quot;ShipName&quot; SortExpression=&quot;ShipName&quot; /&gt;
        &lt;asp:BoundField DataField=&quot;OrderID&quot; HeaderText=&quot;OrderID&quot; InsertVisible=&quot;False&quot; ReadOnly=&quot;True&quot;
            SortExpression=&quot;OrderID&quot; /&gt;
    &lt;/Columns&gt;
    &lt;SelectedRowStyle BackColor=&quot;#FFFF80&quot; /&gt;
&lt;/asp:GridView&gt;
&lt;asp:SqlDataSource ID=&quot;SqlDataSource1&quot; runat=&quot;server&quot; ConnectionString=&quot;&lt;%$ ConnectionStrings:NorthwindConnectionString %&gt;&quot;
    SelectCommand=&quot;SELECT Customers.CompanyName, Orders.OrderDate, Orders.ShipName, Orders.OrderID FROM Orders INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID ORDER BY Orders.OrderDate DESC, Customers.CompanyName&quot;&gt;
&lt;/asp:SqlDataSource&gt;
</pre>
<p><strong>NorthwindOrders.ascx.cs</strong></p>
<pre name="code" class="csharp">

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class NorthwindOrders : System.Web.UI.UserControl
{
    [ConnectionProvider(&quot;Order ID Provider&quot;, &quot;OrderIdProvider&quot;)]
    public Int32 OrderID()
    {
        if (GridView1.SelectedDataKey != null)
            return Convert.ToInt32(GridView1.SelectedDataKey.Value);
        else return -1;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
   {
    }
}
</pre>
<p><strong>Default.aspx</strong></p>
<pre name="code" class="csharp">

&lt;%@ Page Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;Default.aspx.cs&quot; Inherits=&quot;_Default&quot; %&gt;
&lt;%@ Register Src=&quot;OrderDetail.ascx&quot; TagName=&quot;OrderDetail&quot; TagPrefix=&quot;uc2&quot; %&gt;
&lt;%@ Register Src=&quot;NorthwindOrders.ascx&quot; TagName=&quot;NorthwindOrders&quot; TagPrefix=&quot;uc1&quot; %&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head runat=&quot;server&quot;&gt;
    &lt;title&gt;Web Parts Demo&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id=&quot;form1&quot; runat=&quot;server&quot;&gt;
        &lt;div&gt;
            &lt;asp:WebPartManager ID=&quot;WebPartManager1&quot; runat=&quot;server&quot;&gt;
                &lt;StaticConnections&gt;
                    &lt;asp:WebPartConnection ID=&quot;orderConnection&quot; ConsumerConnectionPointID=&quot;OrderIdConsumer&quot;
                        ConsumerID=&quot;OrderDetail1&quot; ProviderConnectionPointID=&quot;OrderIdProvider&quot; ProviderID=&quot;NorthwindOrders1&quot; /&gt;
                &lt;/StaticConnections&gt;
            &lt;/asp:WebPartManager&gt;
            Web Parts Demo&lt;br /&gt;
            &lt;table style=&quot;width: 100%&quot;&gt;
                &lt;tr&gt;
                    &lt;td align=&quot;left&quot; style=&quot;width: 50%&quot; valign=&quot;top&quot;&gt;
                        &lt;asp:WebPartZone ID=&quot;SidebarZone&quot; runat=&quot;server&quot; HeaderText=&quot;Orders&quot; Width=&quot;100%&quot;&gt;
                            &lt;ZoneTemplate&gt;
                                &lt;uc1:NorthwindOrders ID=&quot;NorthwindOrders1&quot; runat=&quot;server&quot; title=&quot;Orders&quot; /&gt;
                            &lt;/ZoneTemplate&gt;
                        &lt;/asp:WebPartZone&gt;
                    &lt;/td&gt;
                    &lt;td align=&quot;left&quot; style=&quot;width: 50%&quot; valign=&quot;top&quot;&gt;
                        &lt;asp:WebPartZone ID=&quot;MainZone&quot; runat=&quot;server&quot; HeaderText=&quot;Main&quot; Width=&quot;100%&quot;&gt;
                            &lt;ZoneTemplate&gt;
                                &lt;uc2:OrderDetail ID=&quot;OrderDetail1&quot; runat=&quot;server&quot; title=&quot;Order Detail&quot; /&gt;
                            &lt;/ZoneTemplate&gt;
                        &lt;/asp:WebPartZone&gt;
                    &lt;/td&gt;
                    &lt;td align=&quot;left&quot; style=&quot;width: 100%&quot; valign=&quot;top&quot;&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/div&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/02/24/aspnet-web-parts-101/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Kudos to Indianapolis animal shelter</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/02/15/kudos-to-indianapolis-animal-shelter/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/02/15/kudos-to-indianapolis-animal-shelter/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 13:26:27 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Dogs]]></category>

		<category><![CDATA[In The News]]></category>

		<category><![CDATA[BSL]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=905</guid>
		<description><![CDATA[I came across this article on MSNBC about the Indianapolis animal shelter&#8217;s new policy on pit bulls - they are no longer going to just kill them for no reason!
Animal Control adopts new pit bull policy 
From the article:
&#8220;Doug Ray says stray pit bulls that come in will be adopted out if they&#8217;re not aggressive. That wasn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I came across this article on MSNBC about the Indianapolis animal shelter&#8217;s new policy on pit bulls - they are no longer going to just kill them for no reason!</p>
<p><a href="http://www.msnbc.msn.com/id/29172558/">Animal Control adopts new pit bull policy</a> </p>
<p><strong>From the article:</strong></p>
<blockquote><p>&#8220;Doug Ray says stray pit bulls that come in will be adopted out if they&#8217;re not aggressive. That wasn&#8217;t the case until Ray got on scene January 12th.&#8221;</p></blockquote>
<p>Not everyone is happy, of course. Some people insist on being prejudiced against dogs that haven&#8217;t done a single thing wrong. I&#8217;m tempted to compare it to racism, honestly.</p>
<blockquote><p>&#8220;&#8221;I&#8217;m not saying that they&#8217;re all bad. No, they&#8217;re not. But you never know how that dog is going to react with a family,&#8221; said Gilbert.</p>
<p class="textBodyBlack">Ray says that&#8217;s true for any dog, not just pit bulls.&#8221;</p>
</blockquote>
<p class="textBodyBlack"><strong>As the owner of a Rottweiler that I raised to be a stable, obedient, and friendly dog, I want to thank Doug Ray. Thank you, thank you, thank you. </strong>Dangerous dogs come in all flavors and sizes. The meanest dog in my neighborhood is a Lab! </p>
<p class="textBodyBlack"><strong>Please support Doug Ray in his efforts to educate people that it isn&#8217;t that ALL pit bulls (or any other breed) that are &#8220;bad&#8221;. </strong></p>
<p class="textBodyBlack">Let&#8217;s stop blaming dogs and start blaming the people who own dangerous dogs, shall we? A large, powerful dog of any breed, in the wrong hands, can become a deadly danger to a community. Let&#8217;s punish the wrong hands, not the dogs. BLAME THE DEED, AND THE OWNER, NOT THE BREED.</p>
<p class="textBodyBlack"> </p>
<div id="attachment_907" class="wp-caption alignnone" style="width: 207px"><a href="http://www.understand-a-bull.com/"><img class="size-medium wp-image-907" title="kota-bsl" src="http://www.kaelisspace.com/wordpress22/wp-content/uploads/2009/02/kota-bsl-197x300.png" alt="No BSL" width="197" height="300" /></a><p class="wp-caption-text">No BSL</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/02/15/kudos-to-indianapolis-animal-shelter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Happy Valentine’s Day!</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/02/14/happy-valentines-day/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/02/14/happy-valentines-day/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 13:00:37 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Cats]]></category>

		<category><![CDATA[caturday]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=897</guid>
		<description><![CDATA[
more animals
]]></description>
			<content:encoded><![CDATA[<p><a href="http://icanhascheezburger.com/2009/02/10/funny-pictures-y-u-werked-so-late/"><img class="mine_3181694" title="funny-pictures-your-cat-missed-you-on-valentines-day" src="http://icanhascheezburger.wordpress.com/files/2009/01/funny-pictures-your-cat-missed-you-on-valentines-day.jpg" alt="funny pictures of cats with captions" /></a><br />
more <a href="http://icanhascheezburger.com">animals</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/02/14/happy-valentines-day/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More fun with e-mail forwards</title>
		<link>http://www.kaelisspace.com/wordpress22/2009/02/12/more-fun-with-e-mail-forwards/</link>
		<comments>http://www.kaelisspace.com/wordpress22/2009/02/12/more-fun-with-e-mail-forwards/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 02:50:40 +0000</pubDate>
		<dc:creator>kaeli</dc:creator>
		
		<category><![CDATA[Twisted]]></category>

		<category><![CDATA[humor]]></category>

		<guid isPermaLink="false">http://www.kaelisspace.com/wordpress22/?p=903</guid>
		<description><![CDATA[ 
HIGH SCHOOL &#8211; 1958 vs. 2008 
Scenario 1: 
Jack goes quail hunting before school and then pulls into the school parking lot with his shotgun in his truck&#8217;s gun rack. 
1958 - Vice Principal comes over, looks at Jack&#8217;s shotgun, goes to his car and gets his shotgun to show Jack. 
2008 - School goes into [...]]]></description>
			<content:encoded><![CDATA[<p> </p>
<p class="MsoNormal"><strong><em><span style="text-decoration: underline;"><span>HIGH SCHOOL </span></span></em></strong><strong><em><span style="text-decoration: underline;"><span>&#8211; </span></span></em></strong><strong><em><span style="text-decoration: underline;"><span>1958 vs. 2008 </span></span></em></strong><span></span></p>
<p><strong><span style="text-decoration: underline;"><span>Scenario 1: </span></span></strong></p>
<p><strong><span>Jack goes quail hunting before school and then pulls into the school parking lot with his shotgun in his truck&#8217;s gun rack. </span></strong></p>
<p><strong><span>1958 - </span></strong><span>Vice Principal comes over, looks at Jack&#8217;s shotgun, goes to his car and gets his shotgun to show Jack. </span></p>
<p><strong><span>2008 - </span></strong><span>School goes into lock down, FBI called, Jack hauled off to jail and never sees his truck or gun again. Counselors called in for traumatized students and teachers.   </span></p>
<p><strong><span><br />
</span></strong><strong><span style="text-decoration: underline;"><span>Scenario 2: </span></span></strong></p>
<p><strong><span>Johnny and Mark get into a fist fight after school. </span></strong></p>
<p><strong><span>1958 - </span></strong><span>Crowd gathers. Mark wins. Johnny and Mark shake hands and end up buddies. </span></p>
<p><strong><span>2008 - </span></strong><span>Police called and SWAT team arrives &#8212; they arrest both Johnny and Mark. They are both charged them with assault and both expelled even though Johnny started it. </span><span><br />
  </span></p>
<p><strong><span style="text-decoration: underline;"><span>Scenario 3: </span></span></strong></p>
<p><strong><span>Jeffrey will not be still in class, he disrupts other students. </span></strong></p>
<p><strong><span>1958 - </span></strong><span>Jeffrey sent to the Principal&#8217;s office and given a good paddling by the Principal. He then returns to class, sits still and does not disrupt class again. </span></p>
<p><strong><span>2008 - </span></strong><span>Jeffrey is given huge doses of Ritalin. He becomes a zombie. He is then tested for ADD. The school gets extra money from the state because Jeffrey has a disability. </span><span>  </span></p>
<p><span><br />
<strong><span style="text-decoration: underline;">Scenario 4: </span></strong></span></p>
<p><strong><span>Billy breaks a window in his neighbor&#8217;s car and his Dad gives him a whipping with his belt. </span></strong></p>
<p><strong><span><br />
</span></strong><strong><span>1958 - </span></strong><span>Billy is more careful next time, grows up normal, goes to college and becomes a successful businessman. </span></p>
<p><strong><span>2008 - </span></strong><span>Billy&#8217;s dad is arrested for child abuse. Billy is removed to foster care and joins a gang. The state psychologist is told by Billy&#8217;s sister that she remembers being abused herself and their dad goes to prison.<br />
  </span></p>
<p><strong><span style="text-decoration: underline;"><span>Scenario 5: </span></span></strong></p>
<p><strong><span>Mark gets a headache and takes some aspirin to school. </span></strong></p>
<p><strong><span>1958</span></strong><span> <strong>-</strong> Mark shares his aspirin with the Principal out on the smoking dock. </span></p>
<p><strong><span>2008</span></strong><span> <strong>-</strong> The police are called and Mark is expelled from school for drug violations. His car is then searched for drugs and weapons.   </span></p>
<p><strong><span><br />
</span></strong><strong><span><br />
</span></strong><strong><span style="text-decoration: underline;"><span>Scenario 6: </span></span></strong></p>
<p><strong><span>Pedro fails high school English. </span></strong></p>
<p><strong><span>1958</span></strong><span> <strong>-</strong> Pedro goes to summer school, passes English and goes to college. </span></p>
<p><strong><span>2008</span></strong><span> <strong>-</strong> Pedro&#8217;s cause is taken up by state. Newspaper articles appear nationally explaining that teaching English as a requirement for graduation is racist. ACLU files class action lawsuit against the state school system and Pedro&#8217;s English teacher.  English is then banned from core curriculum. Pedro is given his diploma anyway but ends up mowing lawns for a living because he cannot speak English.   </span></p>
<p><strong><span style="text-decoration: underline;"><span>Scenario 7: </span></span></strong></p>
<p><strong><span>Johnny takes apart leftover firecrackers from the Fourth of July, puts them in a model airplane paint bottle and blows up a red ant bed. </span></strong></p>
<p><strong><span>1958 -</span></strong><span> Ants die. </span></p>
<p><strong><span>2008 -</span></strong><span> ATF, Homeland Security and the FBI are all called. Johnny is charged with domestic terrorism. The FBI investigates his parents &#8211; and all siblings are removed from their home and all computers are confiscated. Johnny&#8217;s dad is placed on a terror watch list and is never allowed to fly again. </span><span>  </span></p>
<p><strong><span style="text-decoration: underline;"><span>Scenario 8: </span></span></strong></p>
<p><strong><span>Johnny falls while running during recess and scrapes his knee. He is found crying by his teacher, Mary. Mary hugs him to comfort him. </span></strong></p>
<p><strong><span>1958 -</span></strong><span> In a short time, Johnny feels better and goes on playing. </span></p>
<p class="MsoNormal"><strong><span>2008 -</span></strong><span> Mary is accused of being a sexual predator and loses her job. She faces 3 years in State Prison.  Johnny undergoes 5 years of therapy.<strong> </strong></span><strong><span> </span></strong><strong><span>  </span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaelisspace.com/wordpress22/2009/02/12/more-fun-with-e-mail-forwards/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
