<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>dblendea.net</title>
	<atom:link href="http://dblendea.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dblendea.wordpress.com</link>
	<description>pragmatic software development</description>
	<lastBuildDate>Wed, 16 Nov 2011 20:09:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dblendea.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>dblendea.net</title>
		<link>http://dblendea.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dblendea.wordpress.com/osd.xml" title="dblendea.net" />
	<atom:link rel='hub' href='http://dblendea.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Windows 8 improvements</title>
		<link>http://dblendea.wordpress.com/2011/09/19/windows-8-improvements/</link>
		<comments>http://dblendea.wordpress.com/2011/09/19/windows-8-improvements/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 08:41:38 +0000</pubDate>
		<dc:creator>bdaniel7</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[windows8]]></category>

		<guid isPermaLink="false">http://dblendea.wordpress.com/?p=261</guid>
		<description><![CDATA[The Blue Screen Of Death looks better: it&#8217;s updated to the Internet era. It&#8217;s a developer preview so it can be forgiven. But it&#8217;s a good way to turn customers off. Filed under: Uncategorized Tagged: windows8<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=261&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Blue Screen Of Death looks better: it&#8217;s updated to the Internet era.</p>
<div id="attachment_262" class="wp-caption aligncenter" style="width: 540px"><a href="http://dblendea.files.wordpress.com/2011/09/windows8-improvements.png"><img class="size-full wp-image-262" title="Windows 8 improvements" src="http://dblendea.files.wordpress.com/2011/09/windows8-improvements.png?w=530&#038;h=397" alt="Windows 8 BSOD" width="530" height="397" /></a><p class="wp-caption-text">Windows 8 BSOD</p></div>
<p>It&#8217;s a developer preview so it can be forgiven. But it&#8217;s a good way to turn customers off.</p>
<br />Filed under: <a href='http://dblendea.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://dblendea.wordpress.com/tag/windows8/'>windows8</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dblendea.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dblendea.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dblendea.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dblendea.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dblendea.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dblendea.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dblendea.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dblendea.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dblendea.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dblendea.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dblendea.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dblendea.wordpress.com/261/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dblendea.wordpress.com/261/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dblendea.wordpress.com/261/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=261&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dblendea.wordpress.com/2011/09/19/windows-8-improvements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c78041a1003b8b8f7d27c800723954e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bdaniel7</media:title>
		</media:content>

		<media:content url="http://dblendea.files.wordpress.com/2011/09/windows8-improvements.png" medium="image">
			<media:title type="html">Windows 8 improvements</media:title>
		</media:content>
	</item>
		<item>
		<title>RAM: Chrome or Firefox?</title>
		<link>http://dblendea.wordpress.com/2011/04/12/ram-chrome-or-firefox/</link>
		<comments>http://dblendea.wordpress.com/2011/04/12/ram-chrome-or-firefox/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 08:35:25 +0000</pubDate>
		<dc:creator>bdaniel7</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[chrome vs firefox]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ram]]></category>

		<guid isPermaLink="false">http://dblendea.wordpress.com/?p=244</guid>
		<description><![CDATA[Just a quick snap comparison: Firefox has 13 tabs open, Chrome has 3 plus the &#8220;about:memory&#8221;. Firefox has 36 add-ons of which 1 is disabled, Chrome has 14, of which 6 are disabled. Filed under: Uncategorized Tagged: chrome, chrome vs firefox, firefox, ram<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=244&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a quick snap comparison:</p>
<div id="attachment_245" class="wp-caption alignnone" style="width: 540px"><a href="http://dblendea.files.wordpress.com/2011/04/chrome-vs-firefox.png"><img class="size-full wp-image-245" title="RAM: Chrome vs Firefox" src="http://dblendea.files.wordpress.com/2011/04/chrome-vs-firefox.png?w=530&#038;h=75" alt="ram-chrome-vs-firefox" width="530" height="75" /></a><p class="wp-caption-text">RAM: Chrome vs Firefox</p></div>
<p>Firefox has 13 tabs open, Chrome has 3 plus the &#8220;about:memory&#8221;.</p>
<p>Firefox has 36 add-ons of which 1 is disabled, Chrome has 14, of which 6 are disabled.</p>
<br />Filed under: <a href='http://dblendea.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://dblendea.wordpress.com/tag/chrome/'>chrome</a>, <a href='http://dblendea.wordpress.com/tag/chrome-vs-firefox/'>chrome vs firefox</a>, <a href='http://dblendea.wordpress.com/tag/firefox/'>firefox</a>, <a href='http://dblendea.wordpress.com/tag/ram/'>ram</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dblendea.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dblendea.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dblendea.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dblendea.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dblendea.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dblendea.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dblendea.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dblendea.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dblendea.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dblendea.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dblendea.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dblendea.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dblendea.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dblendea.wordpress.com/244/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=244&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dblendea.wordpress.com/2011/04/12/ram-chrome-or-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c78041a1003b8b8f7d27c800723954e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bdaniel7</media:title>
		</media:content>

		<media:content url="http://dblendea.files.wordpress.com/2011/04/chrome-vs-firefox.png" medium="image">
			<media:title type="html">RAM: Chrome vs Firefox</media:title>
		</media:content>
	</item>
		<item>
		<title>Background image for a table row in IE7</title>
		<link>http://dblendea.wordpress.com/2011/03/24/background-image-for-a-table-row-in-ie7/</link>
		<comments>http://dblendea.wordpress.com/2011/03/24/background-image-for-a-table-row-in-ie7/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 13:34:12 +0000</pubDate>
		<dc:creator>bdaniel7</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[background-image]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[row]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://dblendea.wordpress.com/?p=237</guid>
		<description><![CDATA[Having this structure: &#60;tr class="current"&#62; &#60;td class="project-number"&#62; &#60;/td&#62; &#60;td&#62; &#60;/td&#62; &#60;/tr&#62; .current {background-color: #dcdcdc !important; background: url(../images/current-item.png) no-repeat 0 0;} Class &#8220;current&#8221;  would display a &#8220;&#62;&#8221; arrow to highlight the selected row, however IE7 displays the arrow on each table cell. The solution is to include a css just for IE7: &#60;!--[if lte IE 8]&#62;&#60;link [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=237&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Having this structure:</p>
<pre>&lt;tr class="current"&gt;
 &lt;td class="project-number"&gt;
 &lt;/td&gt;
 &lt;td&gt;
 &lt;/td&gt;
&lt;/tr&gt;

.current {background-color: #<span style="color:#000000;">dcdcdc </span>!important; background: url(../images/current-item.png) no-repeat 0 0;}</pre>
<p>Class &#8220;current&#8221;  would display a &#8220;&gt;&#8221; arrow to highlight the selected row, however IE7 displays the arrow on each table cell.</p>
<p>The solution is to include a css just for IE7:</p>
<pre>&lt;!--[if lte IE 8]&gt;&lt;link rel="stylesheet" type="text/css" href="css/ie7.css" /&gt;&lt;![endif]--&gt;</pre>
<p>Then in ie7.css:</p>
<pre>.current td {background: none;}
.current td {background-color: #dcdcdc !important;}
.current td:first-child {background-color: #dcdcdc !important; background: url(../images/current-item.png) no-repeat 0 0;}
</pre>
<p><strong>Update</strong>: Chrome and Safari have the same bug as IE7, Opera renders the image correctly.</p>
<br />Filed under: <a href='http://dblendea.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://dblendea.wordpress.com/tag/background-image/'>background-image</a>, <a href='http://dblendea.wordpress.com/tag/ie7/'>IE7</a>, <a href='http://dblendea.wordpress.com/tag/row/'>row</a>, <a href='http://dblendea.wordpress.com/tag/table/'>table</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dblendea.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dblendea.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dblendea.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dblendea.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dblendea.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dblendea.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dblendea.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dblendea.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dblendea.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dblendea.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dblendea.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dblendea.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dblendea.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dblendea.wordpress.com/237/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=237&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dblendea.wordpress.com/2011/03/24/background-image-for-a-table-row-in-ie7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c78041a1003b8b8f7d27c800723954e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bdaniel7</media:title>
		</media:content>
	</item>
		<item>
		<title>Multi select DropDownList in ASP.NET</title>
		<link>http://dblendea.wordpress.com/2011/03/21/multiselect-dropdownlist/</link>
		<comments>http://dblendea.wordpress.com/2011/03/21/multiselect-dropdownlist/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 15:53:16 +0000</pubDate>
		<dc:creator>bdaniel7</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[DropDownList]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[multiselect]]></category>

		<guid isPermaLink="false">http://dblendea.wordpress.com/?p=224</guid>
		<description><![CDATA[I needed a dropdown list that allows multi select, a sort of checkbox list paired with a dropdown. For example is very useful when working with months. MS Reporting Services has one. After googling for a while, I couldn&#8217;t find one to satisfy me and I started to play with a dropdown. A click on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=224&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I needed a dropdown list that allows multi select, a sort of checkbox list paired with a dropdown. For example is very useful when working with months. MS Reporting Services has one.</p>
<p>After googling for a while, I couldn&#8217;t find one to satisfy me and I started to play with a dropdown. A click on dropdown and a list of checkboxes appears, another click and the list dissappears. Problem was that the dropdown wanted to show it&#8217;s &#8220;Select month&#8221; option.</p>
<p>Long story short, I paired a TextBox, styled with css to have a &#8220;select arrow&#8221;, with a CheckBoxList and some jQuery:</p>
<div id="attachment_225" class="wp-caption alignnone" style="width: 164px"><a href="http://dblendea.files.wordpress.com/2011/03/multiselect-dropdown.png"><img class="size-medium wp-image-225" title="multiselect-dropdown" src="http://dblendea.files.wordpress.com/2011/03/multiselect-dropdown.png?w=154&#038;h=300" alt="" width="154" height="300" /></a><p class="wp-caption-text">Multiselect DropDownList</p></div>
<p>And here is the code: <a title="MonthsControl" href="http://code.google.com/p/dblendea/downloads/detail?name=MonthsControl-src.7z">MonthsControl-src.7z</a></p>
<br />Filed under: <a href='http://dblendea.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://dblendea.wordpress.com/tag/asp-net/'>ASP.NET</a>, <a href='http://dblendea.wordpress.com/tag/dropdownlist/'>DropDownList</a>, <a href='http://dblendea.wordpress.com/tag/jquery/'>jQuery</a>, <a href='http://dblendea.wordpress.com/tag/multiselect/'>multiselect</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dblendea.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dblendea.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dblendea.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dblendea.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dblendea.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dblendea.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dblendea.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dblendea.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dblendea.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dblendea.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dblendea.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dblendea.wordpress.com/224/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dblendea.wordpress.com/224/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dblendea.wordpress.com/224/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=224&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dblendea.wordpress.com/2011/03/21/multiselect-dropdownlist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c78041a1003b8b8f7d27c800723954e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bdaniel7</media:title>
		</media:content>

		<media:content url="http://dblendea.files.wordpress.com/2011/03/multiselect-dropdown.png?w=154" medium="image">
			<media:title type="html">multiselect-dropdown</media:title>
		</media:content>
	</item>
		<item>
		<title>Cannot pass arguments to OnClientClick javascript</title>
		<link>http://dblendea.wordpress.com/2011/03/09/cannot-pass-arguments-to-onclientclick-javascript/</link>
		<comments>http://dblendea.wordpress.com/2011/03/09/cannot-pass-arguments-to-onclientclick-javascript/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 09:54:08 +0000</pubDate>
		<dc:creator>bdaniel7</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[OnClientClick]]></category>

		<guid isPermaLink="false">http://dblendea.wordpress.com/?p=211</guid>
		<description><![CDATA[I want to give more information to the confirm dialog when the user deletes a record. I&#8217;m using an asp:LinkButton that can execute some javascript when the user clicks it, in the &#8220;OnClientClick&#8221; property. &#60;ItemTemplate&#62;      &#60;asp:LinkButton ID="lnkClose" runat="server" CausesValidation="False" data-number='&#60;%# Eval("Number") %&#62;' CommandArgument='&#60;%# Eval("Id") %&#62;'   CommandName="close" CssClass="selected_item close-project"&#62;Close     &#60;/asp:LinkButton&#62; &#60;/ItemTemplate&#62; Unfortunately, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=211&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I want to give more information to the confirm dialog when the user deletes a record.<br />
I&#8217;m using an asp:LinkButton that can execute some javascript when the user clicks it, in the &#8220;OnClientClick&#8221; property.</p>
<pre class="csharp">&lt;ItemTemplate&gt;
     &lt;asp:LinkButton ID="lnkClose" runat="server" CausesValidation="False"
         <span style="color:#ff0000;">data-number='&lt;%# Eval("Number") %&gt;'</span> CommandArgument='&lt;%# Eval("Id") %&gt;'
         CommandName="close" CssClass="selected_item <span style="color:#0000ff;">close-project</span>"&gt;Close
    &lt;/asp:LinkButton&gt;
 &lt;/ItemTemplate&gt;</pre>
<p>Unfortunately, I cannot pass the project number as an argument to the javascript function in OnClientClick.</p>
<p>Luckily, there is jQuery:</p>
<pre class="javascript">$('#ProjectsList a.<span style="color:#0000ff;">close-project</span>').live("click", function()
 {
     var $parentRow = $(this).parent().parent();
     $parentRow.toggleClass("current");

     var projectNumber = <span style="color:#ff0000;">$(this).attr("data-number")</span>;
     var answer = confirm("Close project " + projectNumber + "?");
     if (!answer)
     {
          $parentRow.toggleClass("current");
     }
     return answer;
 });</pre>
<p><strong><em>Update</em></strong>: There is a way to pass arguments:</p>
<p><a href="http://forums.asp.net/t/980311.aspx/1?Eval+in+an+OnCLientClick">http://forums.asp.net/t/980311.aspx/1?Eval+in+an+OnCLientClick</a></p>
<br />Filed under: <a href='http://dblendea.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://dblendea.wordpress.com/tag/jquery/'>jQuery</a>, <a href='http://dblendea.wordpress.com/tag/onclientclick/'>OnClientClick</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dblendea.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dblendea.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dblendea.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dblendea.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dblendea.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dblendea.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dblendea.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dblendea.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dblendea.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dblendea.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dblendea.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dblendea.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dblendea.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dblendea.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=211&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dblendea.wordpress.com/2011/03/09/cannot-pass-arguments-to-onclientclick-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c78041a1003b8b8f7d27c800723954e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bdaniel7</media:title>
		</media:content>
	</item>
		<item>
		<title>Set active menu item</title>
		<link>http://dblendea.wordpress.com/2011/03/03/set-active-menu-item/</link>
		<comments>http://dblendea.wordpress.com/2011/03/03/set-active-menu-item/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 15:35:22 +0000</pubDate>
		<dc:creator>bdaniel7</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[active menu item]]></category>
		<category><![CDATA[masterpage]]></category>

		<guid isPermaLink="false">https://dblendea.wordpress.com/2011/03/03/set-active-menu-item/</guid>
		<description><![CDATA[I have a menu and I need to highlight the menu item that loaded the current page. I tried to set server-side the id of the body to something unique and pertaining to the current page being loaded. Surprisingly, I could not get the page file name (or some other unique Id) but only the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=199&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:blue;"><span style="color:#000000;">I have a menu and I need to highlight the menu item that loaded the current page. I tried to set server-side the id of the body to something unique and pertaining to the current page being loaded. Surprisingly, I could not get the page file name (or some other unique Id) but only the page title which wasn&#8217;t good enough.</span></span></p>
<p><span style="color:#000000;">The HTML (in a Master page):</span></p>
<pre class="code"><span style="color:blue;">&lt;</span><span style="color:#a31515;">div </span><span style="color:red;">id</span><span style="color:blue;">="menu"&gt;
</span><span style="color:blue;">    &lt;</span><span style="color:#a31515;">ul</span><span style="color:blue;">&gt;
        &lt;</span><span style="color:#a31515;">li </span><span style="color:red;">id</span><span style="color:blue;">="regions"&gt;
            &lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">HyperLink </span><span style="color:red;">ID</span><span style="color:blue;">="hlRegions" </span><span style="color:red;">runat</span><span style="color:blue;">="server" </span><span style="color:red;">CssClass</span><span style="color:blue;">="menu-item"
                                  </span><span style="color:red;">NavigateUrl</span><span style="color:blue;">="~/Regions.aspx"&gt;</span>Regions<span style="color:blue;">&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">HyperLink</span><span style="color:blue;">&gt;
        &lt;/</span><span style="color:#a31515;">li</span><span style="color:blue;">&gt;
        &lt;</span><span style="color:#a31515;">li </span><span style="color:red;">id</span><span style="color:blue;">="municipalities"&gt;
            &lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">HyperLink </span><span style="color:red;">ID</span><span style="color:blue;">="hlMunicipalities" </span><span style="color:red;">runat</span><span style="color:blue;">="server" </span><span style="color:red;">CssClass</span><span style="color:blue;">="menu-item"
                                  </span><span style="color:red;">NavigateUrl</span><span style="color:blue;">="~/Municipalities.aspx"&gt;</span>Municipalities<span style="color:blue;">&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">HyperLink</span><span style="color:blue;">&gt;
        &lt;/</span><span style="color:#a31515;">li</span><span style="color:blue;">&gt;</span></pre>
<pre class="code"><span style="color:blue;">    &lt;/<span style="color:#a31515;">ul</span>&gt;</span></pre>
<pre class="code"><span style="color:blue;">&lt;/<span style="color:#a31515;">div</span>&gt;

</span></pre>
<p><span style="color:#000000;">The Javascript:</span></p>
<pre class="code"><span style="color:blue;">&lt;</span><span style="color:#a31515;">script </span><span style="color:red;">type</span><span style="color:blue;">="text/javascript" &gt;
        function </span>getPageName()
        {
            <span style="color:blue;">var </span>loc = document.location.href;
            <span style="color:blue;">return </span>loc.substring(loc.lastIndexOf(<span style="color:#a31515;">'/'</span>) + 1, loc.indexOf(<span style="color:#a31515;">'.'</span>)).toLowerCase();
        }
        jQuery(document).ready(<span style="color:blue;">function</span>($)
        {
            <span style="color:blue;">var </span>pageName = getPageName();
            log(<span style="color:#a31515;">"pageName:"</span>, <span style="color:blue;">this</span>, pageName);

            $(<span style="color:#a31515;">'#menu li'</span>).removeClass(<span style="color:#a31515;">"selected-menu"</span>);
            $(<span style="color:#a31515;">'#menu ul #' </span>+ pageName).addClass(<span style="color:#a31515;">"selected-menu"</span>);
        });
<span style="color:blue;">&lt;/</span><span style="color:#a31515;">script</span><span style="color:blue;">&gt;</span></pre>
<p>Each time the page loads, the &#8220;<span style="color:#a31515;">selected-menu</span>&#8221; class is removed from all <span style="color:#a31515;">li</span> items under <span style="color:#a31515;">#menu<span style="color:#000000;">. Then, the &#8220;</span></span><span style="color:#a31515;">selected-menu</span><span style="color:#a31515;"><span style="color:#000000;">&#8221; class is added to the <span style="color:#a31515;">li<span style="color:#000000;"> item that has the id equal to the page being loaded.</span></span></span></span></p>
<br />Filed under: <a href='http://dblendea.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://dblendea.wordpress.com/tag/active-menu-item/'>active menu item</a>, <a href='http://dblendea.wordpress.com/tag/masterpage/'>masterpage</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dblendea.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dblendea.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dblendea.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dblendea.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dblendea.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dblendea.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dblendea.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dblendea.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dblendea.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dblendea.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dblendea.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dblendea.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dblendea.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dblendea.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=199&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dblendea.wordpress.com/2011/03/03/set-active-menu-item/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c78041a1003b8b8f7d27c800723954e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bdaniel7</media:title>
		</media:content>
	</item>
		<item>
		<title>GridView, NHibernate and sorting</title>
		<link>http://dblendea.wordpress.com/2011/03/02/gridview-nhibernate-and-sorting/</link>
		<comments>http://dblendea.wordpress.com/2011/03/02/gridview-nhibernate-and-sorting/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 14:22:33 +0000</pubDate>
		<dc:creator>bdaniel7</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[NHibernate]]></category>
		<category><![CDATA[ObjectDataSource]]></category>
		<category><![CDATA[WebGrid]]></category>

		<guid isPermaLink="false">https://dblendea.wordpress.com/2011/03/02/gridview-nhibernate-and-sorting/</guid>
		<description><![CDATA[If you&#8217;re using an ASP.NET GridView with a custom DAL you might get this error when trying to sort the grid by clicking the column headers: The data source does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet. The web has some solutions to this problem, however [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=193&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:small;">If you&#8217;re using an ASP.NET GridView with a custom DAL you might get this error when trying to sort the grid by clicking the column headers:</span></p>
<p><span style="color:#ff0000;font-size:small;">The data source does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet.</span></p>
<p><span style="font-size:small;">The web has some solutions to this problem, however I&#8217;ve found them either not working, sorting only in memory or too complex.</span></p>
<p><span style="font-size:small;">I&#8217;m using NHibernate and the simplest solution was to parse the sortExpression from the ObjectDataSource into a list of NHibernate.Criterion.Order, then add the Orders to the ICriteria.</span></p>
<p><span style="font-size:small;">This way, I only have to add  <span style="color:red;">SortParameterName</span><span style="color:blue;">=&#8221;sortExpression&#8221; </span>to the ObjectDataSource and the corresponding code in the Select method.</span></p>
<p><span style="font-size:small;">The ObjectDataSource:</span></p>
<pre class="code"><span style="font-size:small;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">ObjectDataSource </span><span style="color:red;">ID</span><span style="color:blue;">="odsProjects" </span><span style="color:red;">EnablePaging</span><span style="color:blue;">="true" </span><span style="color:red;">runat</span><span style="color:blue;">="server"</span><span style="color:red;">
    SelectMethod</span></span><span style="font-size:small;"><span style="color:blue;">="FindAll"
</span><span style="color:red;">    SortParameterName</span><span style="color:blue;">="sortExpression"
 </span><span style="color:red;">   SelectCountMethod</span><span style="color:blue;">="GetCountOfProjects" </span><span style="color:red;">TypeName</span><span style="color:blue;">="Model.Project"</span></span><span style="font-size:small;"><span style="color:blue;">&gt;
</span><span style="color:blue;">&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">ObjectDataSource</span><span style="color:blue;">&gt;</span></span></pre>
<p><span style="font-size:small;">The GridView:</span></p>
<pre class="code"><span style="font-size:small;"><span style="color:blue;">&lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">TemplateField </span><span style="color:red;">HeaderText</span><span style="color:blue;">="Title" </span><span style="color:red;">SortExpression</span></span><span style="font-size:small;"><span style="color:blue;">="Title"&gt;
    &lt;</span><span style="color:#a31515;">ItemTemplate</span></span><span style="font-size:small;"><span style="color:blue;">&gt;
        &lt;</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">LinkButton </span><span style="color:red;">ID</span><span style="color:blue;">="lnkProjectTitle" </span><span style="color:red;">runat</span><span style="color:blue;">="server"
         </span><span style="color:red;">CommandName</span><span style="color:blue;">="select" </span><span style="color:red;">Text</span><span style="color:blue;">='</span><span style="background:#ffee62;">&lt;%</span># Eval("Title") <span style="background:#ffee62;">%&gt;</span></span><span style="font-size:small;"><span style="color:blue;">'
        </span><span style="color:red;"> CausesValidation</span><span style="color:blue;">="False"</span><span style="color:blue;">&gt;&lt;/</span><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">LinkButton</span></span><span style="font-size:small;"><span style="color:blue;">&gt;
    &lt;/</span><span style="color:#a31515;">ItemTemplate</span><span style="color:blue;">&gt;</span></span><span style="color:blue;">
<span style="font-size:small;">&lt;/</span></span><span style="font-size:small;"><span style="color:#a31515;">asp</span><span style="color:blue;">:</span><span style="color:#a31515;">TemplateField</span><span style="color:blue;">&gt;</span></span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p><span style="font-size:small;">The Find method in the Project class:</span></p>
<pre class="code"><span style="font-size:small;"><span style="color:blue;">public static </span><span style="color:#2b91af;">IList</span>&lt;<span style="color:#2b91af;">Project</span>&gt; FindAll ( <span style="color:blue;">int </span>startRowIndex, <span style="color:blue;">int </span>maximumRows, <span style="color:blue;">string </span>sortExpression)
{
    <span style="color:#2b91af;">ISessionFactoryHolder </span>sessionHolder = <span style="color:#2b91af;">ActiveRecordMediator</span>.GetSessionFactoryHolder();
    <span style="color:#2b91af;">ISession </span>session = sessionHolder.CreateSession( <span style="color:blue;">typeof</span>( <span style="color:#2b91af;">Project </span>) );

    </span><span style="font-size:small;"><span style="color:blue;">try
    </span>{
        <span style="color:#2b91af;">ICriteria </span>crit = session.CreateCriteria( <span style="color:blue;">typeof</span>( <span style="color:#2b91af;">Project </span>) );

        crit.SetFirstResult( startRowIndex )
            .SetMaxResults( maximumRows );</span>
<span style="font-size:small;"><span style="color:green;">        // the important thing</span>
        </span><strong><span style="font-size:small;"><span style="color:blue;">if </span>( <span style="color:blue;">string</span>.IsNullOrEmpty( sortExpression ) )
            crit.AddOrder( <span style="color:#2b91af;">Order</span>.Desc( <span style="color:#a31515;">"Id" </span>) );
        </span></strong><span style="font-size:small;"><strong><span style="color:blue;">else
        </span>{
            <span style="color:blue;">foreach </span>( <span style="color:#2b91af;">Order </span>order <span style="color:blue;">in </span><span style="color:#2b91af;">Extensions</span>.CreateOrdersFrom( sortExpression ) )
            {
                crit.AddOrder( order );
            }
        }</strong>

        <span style="color:blue;">return </span>crit.SetCacheable( <span style="color:blue;">true </span>).List&lt;<span style="color:#2b91af;">Project</span>&gt;();
    }
    <span style="color:blue;">catch </span>( <span style="color:#2b91af;">Exception </span>ex )
    {
        log.ErrorException( <span style="color:#a31515;">"FindAll: "</span>, ex );
        <span style="color:blue;">return new </span><span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">Project</span>&gt;();
    }
    </span><span style="font-size:small;"><span style="color:blue;">finally
    </span>{
        sessionHolder.ReleaseSession( session );
    }
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p><span style="font-size:small;">The CreateOrdersFrom method:</span></p>
<pre class="code"><span style="color:gray;"><span style="font-size:small;">/// &lt;summary&gt;
/// </span></span><span style="color:green;"><span style="font-size:small;">Creates a list of NHibernate.Criterion.Order from an sql sort expression. If sort is missing, ASC is assumed.
</span></span><span style="font-size:small;"><span style="color:gray;">/// &lt;/summary&gt;
/// &lt;param name="sqlSortExpression"&gt;</span><span style="color:green;">Id DESC, Number ASC or Id, Name desc</span></span><span style="font-size:small;"><span style="color:gray;">&lt;/param&gt;
/// &lt;returns&gt;&lt;/returns&gt;
</span><span style="color:blue;">public static </span><span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">Order</span>&gt; CreateOrdersFrom ( <span style="color:blue;">string </span>sqlSortExpression )
{
    <span style="color:blue;">if </span>( <span style="color:blue;">string</span>.IsNullOrEmpty( sqlSortExpression ) )
        <span style="color:blue;">return new </span><span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">Order</span>&gt;();

    <span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">Order</span>&gt; orders = <span style="color:blue;">new </span><span style="color:#2b91af;">List</span>&lt;<span style="color:#2b91af;">Order</span>&gt;();
    <span style="color:blue;">string</span>[] sortExpressions = sqlSortExpression.Trim().Split( <span style="color:#a31515;">',' </span>);

    <span style="color:#2b91af;">Array</span>.ForEach( sortExpressions, sortExpression =&gt;
    {
        log.Debug( <span style="color:#a31515;">"expr: {0}."</span>, sortExpression );

        <span style="color:blue;">string</span>[] columnAndSort = sortExpression.Trim().Split( <span style="color:#a31515;">' ' </span>);

        <span style="color:blue;">string </span>column = <span style="color:#a31515;">""</span>, sort = <span style="color:#a31515;">"asc"</span>;

        <span style="color:blue;">if </span>( columnAndSort.Length == 1 )
        {
            column = columnAndSort[0];
        }
        <span style="color:blue;">if </span>( columnAndSort.Length == 2 )
        {
            column = columnAndSort[0];
            sort = columnAndSort[1];
        }
        log.Debug( <span style="color:#a31515;">"{0} x {1}."</span>, column, sort );

        orders.Add( sort.ToLowerInvariant() == <span style="color:#a31515;">"asc" </span>? <span style="color:#2b91af;">Order</span>.Asc( column ) : <span style="color:#2b91af;">Order</span>.Desc( column ) );
    } );

    <span style="color:blue;">return </span>orders;
}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<br />Filed under: <a href='http://dblendea.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://dblendea.wordpress.com/tag/nhibernate/'>NHibernate</a>, <a href='http://dblendea.wordpress.com/tag/objectdatasource/'>ObjectDataSource</a>, <a href='http://dblendea.wordpress.com/tag/webgrid/'>WebGrid</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dblendea.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dblendea.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dblendea.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dblendea.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dblendea.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dblendea.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dblendea.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dblendea.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dblendea.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dblendea.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dblendea.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dblendea.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dblendea.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dblendea.wordpress.com/193/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=193&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dblendea.wordpress.com/2011/03/02/gridview-nhibernate-and-sorting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c78041a1003b8b8f7d27c800723954e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bdaniel7</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows Home Server FAIL</title>
		<link>http://dblendea.wordpress.com/2011/02/25/windows-home-server-fail/</link>
		<comments>http://dblendea.wordpress.com/2011/02/25/windows-home-server-fail/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 21:47:00 +0000</pubDate>
		<dc:creator>bdaniel7</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[windows home server]]></category>

		<guid isPermaLink="false">https://dblendea.wordpress.com/2011/02/26/windows-home-server-fail/</guid>
		<description><![CDATA[This is a good reason not to install Windows Home Server. The setup will format ALL disks attached to the computer. Next, I&#8217;ll try FreeNAS, powered by FreeBSD. Filed under: Uncategorized Tagged: install, windows home server<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=186&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p> This is a good reason not to install Windows Home Server.</p>
<p><a href="http://dblendea.files.wordpress.com/2011/02/windowshomeserverfail.jpg"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="windows-home-server-fail" border="0" alt="windows-home-server-fail" src="http://dblendea.files.wordpress.com/2011/02/windowshomeserverfail_thumb.jpg?w=244&#038;h=184" width="244" height="184" /></a></p>
<p>The setup will format ALL disks attached to the computer.</p>
<p>Next, I&#8217;ll try FreeNAS, powered by FreeBSD.</p>
<br />Filed under: <a href='http://dblendea.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://dblendea.wordpress.com/tag/install/'>install</a>, <a href='http://dblendea.wordpress.com/tag/windows-home-server/'>windows home server</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dblendea.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dblendea.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dblendea.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dblendea.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dblendea.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dblendea.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dblendea.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dblendea.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dblendea.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dblendea.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dblendea.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dblendea.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dblendea.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dblendea.wordpress.com/186/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=186&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dblendea.wordpress.com/2011/02/25/windows-home-server-fail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c78041a1003b8b8f7d27c800723954e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bdaniel7</media:title>
		</media:content>

		<media:content url="http://dblendea.files.wordpress.com/2011/02/windowshomeserverfail_thumb.jpg" medium="image">
			<media:title type="html">windows-home-server-fail</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery Validation and select tags</title>
		<link>http://dblendea.wordpress.com/2011/01/28/jquery-validation-and-select-tags/</link>
		<comments>http://dblendea.wordpress.com/2011/01/28/jquery-validation-and-select-tags/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 12:12:36 +0000</pubDate>
		<dc:creator>bdaniel7</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[select]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">https://dblendea.wordpress.com/2011/01/28/jquery-validation-and-select-tags/</guid>
		<description><![CDATA[Just a note to myself, when using jQuery Validation for a select, make sure the first value, &#34;Please select an option&#34; has an empty value. Like this: &#60;select id=&#34;regions&#34; class=&#34;required&#34; name=&#34;regions&#34;&#62; &#60;option value=&#34;&#34;&#62;Please select an option&#60;/option&#62; &#60;option value=&#34;1&#34;&#62;Region 1&#60;/option&#62; &#60;option value=&#34;2&#34;&#62;Region 2&#60;/option&#62; &#60;/select&#62; Here&#8217;s the original text: http://docs.jquery.com/Plugins/Validation/Methods/required Filed under: Uncategorized Tagged: jQuery, select, validation<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=181&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a note to myself, when using <a href="http://jquery.com/" target="_blank">jQuery</a> Validation for a select, make sure the first value, &quot;Please select an option&quot; has an empty value.</p>
<p>Like this:</p>
<pre class="code"><span style="color:blue;">&lt;</span><span style="color:#a31515;">select </span><span style="color:red;">id</span><span style="color:blue;">=&quot;regions&quot; </span><span style="color:red;">class</span><span style="color:blue;">=&quot;required&quot; </span><span style="color:red;">name</span><span style="color:blue;">=&quot;regions&quot;&gt;
    &lt;</span><span style="color:#a31515;">option </span><span style="color:red;">value</span><span style="color:blue;">=&quot;&quot;&gt;</span>Please select an option<span style="color:blue;">&lt;/</span><span style="color:#a31515;">option</span><span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">option </span><span style="color:red;">value</span><span style="color:blue;">=&quot;1&quot;&gt;</span>Region 1<span style="color:blue;">&lt;/</span><span style="color:#a31515;">option</span><span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">option </span><span style="color:red;">value</span><span style="color:blue;">=&quot;2&quot;&gt;</span>Region 2<span style="color:blue;">&lt;/</span><span style="color:#a31515;">option</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:#a31515;">select</span><span style="color:blue;">&gt;</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Here&#8217;s the original text:</p>
<p><a title="http://docs.jquery.com/Plugins/Validation/Methods/required" href="http://docs.jquery.com/Plugins/Validation/Methods/required" target="_blank">http://docs.jquery.com/Plugins/Validation/Methods/required</a></p>
<br />Filed under: <a href='http://dblendea.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://dblendea.wordpress.com/tag/jquery/'>jQuery</a>, <a href='http://dblendea.wordpress.com/tag/select/'>select</a>, <a href='http://dblendea.wordpress.com/tag/validation/'>validation</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dblendea.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dblendea.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dblendea.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dblendea.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dblendea.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dblendea.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dblendea.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dblendea.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dblendea.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dblendea.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dblendea.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dblendea.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dblendea.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dblendea.wordpress.com/181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=181&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dblendea.wordpress.com/2011/01/28/jquery-validation-and-select-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c78041a1003b8b8f7d27c800723954e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bdaniel7</media:title>
		</media:content>
	</item>
		<item>
		<title>Validate a form on a click (pun intended)</title>
		<link>http://dblendea.wordpress.com/2010/09/30/validate-a-form-on-a-click-pun-intended/</link>
		<comments>http://dblendea.wordpress.com/2010/09/30/validate-a-form-on-a-click-pun-intended/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 09:37:32 +0000</pubDate>
		<dc:creator>bdaniel7</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[event.preventDefault()]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[querystring]]></category>

		<guid isPermaLink="false">https://dblendea.wordpress.com/2010/09/30/validate-a-form-on-a-click-pun-intended/</guid>
		<description><![CDATA[I have a grid with users, where for each user several reports can be generated. The reports must have a start and end date and because some technical constraints and because I wanted to let users re-use an url, I decided to send the values by query string. Then, I had to add some validation, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=160&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have a grid with users, where for each user several reports can be generated.</p>
<p>The reports must have a start and end date and because some technical constraints and because I wanted to let users re-use an url, I decided to send the values by query string.</p>
<p>Then, I had to add some validation, so that the user would be forced to select the report dates.</p>
<p>Then, the problem, how to prevent the click on the link if the form was not valid?</p>
<p>Here&#8217;s the solution:</p>
<p>&#160;</p>
<pre><span style="color:blue;">&lt;</span><span style="color:#a31515;">div </span><span style="color:red;">id</span><span style="color:blue;">=&quot;start-date-area&quot;&gt;
    &lt;</span><span style="color:#a31515;">p</span><span style="color:blue;">&gt;</span>Select the start date:<span style="color:blue;">&lt;/</span><span style="color:#a31515;">p</span><span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">input </span><span style="color:red;">id</span><span style="color:blue;">=&quot;cal-from-date&quot; </span><span style="color:red;">name</span><span style="color:blue;">=&quot;from&quot; </span><span style="color:red;">type</span><span style="color:blue;">=&quot;text&quot; </span><span style="color:red;">class</span><span style="color:blue;">=&quot;required <font color="#008080">for-report</font> clickable&quot; </span><span style="color:red;">readonly</span><span style="color:blue;">=&quot;readonly&quot; /&gt;
    &lt;</span><span style="color:#a31515;">p</span><span style="color:blue;">&gt;&lt;/</span><span style="color:#a31515;">p</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:#a31515;">div</span><span style="color:blue;">&gt;
&lt;</span><span style="color:#a31515;">div </span><span style="color:red;">id</span><span style="color:blue;">=&quot;end-date-area&quot;&gt;
    &lt;</span><span style="color:#a31515;">p</span><span style="color:blue;">&gt;</span>Select the end date:<span style="color:blue;">&lt;/</span><span style="color:#a31515;">p</span><span style="color:blue;">&gt;
    &lt;</span><span style="color:#a31515;">input </span><span style="color:red;">id</span><span style="color:blue;">=&quot;cal-to-date&quot; </span><span style="color:red;">name</span><span style="color:blue;">=&quot;to&quot; </span><span style="color:red;">type</span><span style="color:blue;">=&quot;text&quot; </span><span style="color:red;">class</span><span style="color:blue;">=&quot;required <font color="#008080">for-report</font> clickable&quot; </span><span style="color:red;">readonly</span><span style="color:blue;">=&quot;readonly&quot; /&gt;
    &lt;</span><span style="color:#a31515;">p</span><span style="color:blue;">&gt;&lt;/</span><span style="color:#a31515;">p</span><span style="color:blue;">&gt;
&lt;/</span><span style="color:#a31515;">div</span><span style="color:blue;">&gt;</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>&#160; </p>
<pre>$(<span style="color:#a31515;">&quot;a.submit&quot;</span>).live(<span style="color:#a31515;">&quot;click&quot;</span>, <span style="color:blue;">function</span>(ev)
{
    ev.preventDefault();
    <span style="color:blue;">var </span>$self = $(<span style="color:blue;">this</span>);

    $(<span style="color:#a31515;">&quot;#aspnetForm&quot;</span>).validate();
    <span style="color:blue;">if </span>($(<span style="color:#a31515;">&quot;#aspnetForm&quot;</span>).valid())
    {
        <span style="color:green;">// generate a querystring fragment from the fields I need to send to the server
        </span><span style="color:blue;">var </span>qs = $(<span style="color:#a31515;">&quot;<font color="#008080">.for-report</font>&quot;</span>).serialize();

        <span style="color:green;">//console.log(&quot;qs: &quot; + qs);
        </span>document.location = $self.attr(<span style="color:#a31515;">&quot;href&quot;</span>) + <span style="color:#a31515;">&quot;&amp;&quot; </span>+ qs;
    }
});</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>I have used $(<span style="color:#a31515;">&quot;a.submit&quot;</span>).live(<span style="color:#a31515;">&quot;click&quot;</span>, <span style="color:blue;">function</span>(ev) instead of </p>
<p>$(<span style="color:#a31515;">&quot;a.submit&quot;</span>).click(<span style="color:blue;">function</span>(ev) because the rows are added in the grid using ajax and <em>click</em> works only on current elements and not on possible future elements.</p>
<p><a href="http://11011.net/software/vspaste"></a></p>
<br />Filed under: <a href='http://dblendea.wordpress.com/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://dblendea.wordpress.com/tag/event-preventdefault/'>event.preventDefault()</a>, <a href='http://dblendea.wordpress.com/tag/jquery/'>jQuery</a>, <a href='http://dblendea.wordpress.com/tag/querystring/'>querystring</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dblendea.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dblendea.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dblendea.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dblendea.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dblendea.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dblendea.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dblendea.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dblendea.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dblendea.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dblendea.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dblendea.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dblendea.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dblendea.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dblendea.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dblendea.wordpress.com&amp;blog=9614809&amp;post=160&amp;subd=dblendea&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dblendea.wordpress.com/2010/09/30/validate-a-form-on-a-click-pun-intended/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c78041a1003b8b8f7d27c800723954e9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bdaniel7</media:title>
		</media:content>
	</item>
	</channel>
</rss>
