<?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:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-3277088726597339855</atom:id><lastBuildDate>Mon, 16 Jan 2012 18:39:41 +0000</lastBuildDate><category>wcf</category><category>nHibernate</category><category>Visual Studio</category><category>linq</category><category>tools</category><category>S#Arp</category><category>javascript</category><category>personal</category><category>Logging</category><category>ruby watir</category><category>WHS</category><category>IIS</category><category>C#</category><category>css</category><category>sql</category><category>tips</category><category>ComponentArt</category><category>SSRS</category><category>WTF</category><category>.net</category><category>off topic</category><category>ASP.Net</category><category>ASP.Net MVC</category><category>SSIS</category><category>EntLib</category><category>Unit Testing</category><category>vista</category><title>Berke</title><description>Various Ramblings of a .Net Web Developer</description><link>http://jberke.blogspot.com/</link><managingEditor>noreply@blogger.com (Josh Berke)</managingEditor><generator>Blogger</generator><openSearch:totalResults>81</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><feedburner:info uri="berke" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-sa/3.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://jberke.blogspot.com/" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Fjberke.blogspot.com%2F" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Fjberke.blogspot.com%2F" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Fjberke.blogspot.com%2F" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://jberke.blogspot.com/" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fjberke.blogspot.com%2F" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Fjberke.blogspot.com%2F" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Fjberke.blogspot.com%2F" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-7802946017084812996</guid><pubDate>Tue, 03 Jan 2012 16:46:00 +0000</pubDate><atom:updated>2012-01-16T13:39:41.877-05:00</atom:updated><title>Testing Streaming</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/giVjNMSVvP9RPA5gTDHldWfY2aU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/giVjNMSVvP9RPA5gTDHldWfY2aU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/giVjNMSVvP9RPA5gTDHldWfY2aU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/giVjNMSVvP9RPA5gTDHldWfY2aU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;You can ignore this post, need to figure out how to stream a video not using youtube...jo joy&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif; font-size: x-small;"&gt;&lt;b&gt;Youtube hosted&lt;/b&gt; &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" frameborder="0" height="360" src="http://www.youtube.com/embed/5rXQxj4QCHI" width="480"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Option 1 - Add download link to self hosted file&lt;/b&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;&lt;b&gt;AVI&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;If your unable to view this video, you can right click &lt;a href="http://downloads.mygiddyup.com/Videos/Release-1.7.8.avi"&gt;here &lt;/a&gt;and select save as target to download the video.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;&lt;b&gt;WMV&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;If your unable to view this video, you can right click&amp;nbsp;&lt;a href="http://downloads.mygiddyup.com/Videos/Release-1.7.8.wmv"&gt;here&amp;nbsp;&lt;/a&gt;and select save as target to download the video.&lt;/span&gt;&lt;br /&gt;
&lt;br class="Apple-interchange-newline" /&gt;&lt;strong&gt;WMV Hosted on Google Sites&lt;/strong&gt;&lt;br /&gt;
If your unable to view this video you can right click &lt;a href="https://sites.google.com/site/issgiddyup/documents/Release-1.7.8.wmv?attredirects=0&amp;amp;d=1"&gt;here&lt;/a&gt; and select save as target to download the video.&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;&lt;b&gt;Option 2 - Use Blogger (Might still be blocked)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;Uses youtube won't work....and horrible player &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;object width="320" height="266" class="BLOG_video_class" id="BLOG_video-540cb25bae5df756" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;
&lt;param name="bgcolor" value="#FFFFFF"&gt;
&lt;param name="allowfullscreen" value="true"&gt;
&lt;param name="flashvars" value="flvurl=http://v20.nonxt3.googlevideo.com/videoplayback?id%3D540cb25bae5df756%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1329539040%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D290654866669EB1C8377EEAA20983F1950CDBB49.14DA0E2A2D43D6CD925021D70DB815F99FC0F8DC%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D540cb25bae5df756%26offsetms%3D5000%26itag%3Dw160%26sigh%3DMsqF-6Yc_vykck1vJkSlI1ve4-k&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;
&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"
width="320" height="266" bgcolor="#FFFFFF"
flashvars="flvurl=http://v20.nonxt3.googlevideo.com/videoplayback?id%3D540cb25bae5df756%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1329539040%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D290654866669EB1C8377EEAA20983F1950CDBB49.14DA0E2A2D43D6CD925021D70DB815F99FC0F8DC%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D540cb25bae5df756%26offsetms%3D5000%26itag%3Dw160%26sigh%3DMsqF-6Yc_vykck1vJkSlI1ve4-k&amp;autoplay=0&amp;ps=blogger"
allowFullScreen="true" /&gt;&lt;/object&gt;
&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Trebuchet MS&amp;quot;, sans-serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-7802946017084812996?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=7qhcK_9s1bs:QJ5a_b2yOGE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=7qhcK_9s1bs:QJ5a_b2yOGE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=7qhcK_9s1bs:QJ5a_b2yOGE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=7qhcK_9s1bs:QJ5a_b2yOGE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=7qhcK_9s1bs:QJ5a_b2yOGE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/7qhcK_9s1bs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/7qhcK_9s1bs/testing-streaming.html</link><author>noreply@blogger.com (Josh Berke)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/5rXQxj4QCHI/default.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://jberke.blogspot.com/2012/01/testing-streaming.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-9029111793378897944</guid><pubDate>Mon, 05 Dec 2011 14:04:00 +0000</pubDate><atom:updated>2011-12-05T09:04:50.419-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">off topic</category><title>USPS Woes</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-OieQFyy4nEfHOTunC-AHPYXuis/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-OieQFyy4nEfHOTunC-AHPYXuis/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-OieQFyy4nEfHOTunC-AHPYXuis/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-OieQFyy4nEfHOTunC-AHPYXuis/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I heard recently that the USPS is facing major cutbacks. Thinking about this led me to an idea. What if the USPS provided a pay-to send email service for every postal customer in the united states. A major problem with email today is the&amp;nbsp;amount&amp;nbsp;of spam, and this is in part due to the&amp;nbsp;extremely&amp;nbsp;low cost of sending email out.&lt;br /&gt;
&lt;br /&gt;
If the USPS provided a paid email service which charged the sender, a nominal fee that is cheaper to send paper mail, and at the same time more expensive then email, I think you would find a large audience that would adopt this. Since I am neither the post master general, or a&amp;nbsp;politician, I'll leave all the thousands of details alone.&lt;br /&gt;
&lt;br /&gt;
Is it not time for the USPS to go green?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-9029111793378897944?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=-dh_ArTaR4g:u-xCqvOIqxk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=-dh_ArTaR4g:u-xCqvOIqxk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=-dh_ArTaR4g:u-xCqvOIqxk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=-dh_ArTaR4g:u-xCqvOIqxk:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=-dh_ArTaR4g:u-xCqvOIqxk:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/-dh_ArTaR4g" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/-dh_ArTaR4g/usps-woes.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>0</thr:total><feedburner:origLink>http://jberke.blogspot.com/2011/12/usps-woes.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-7604752966938816711</guid><pubDate>Sat, 03 Dec 2011 22:51:00 +0000</pubDate><atom:updated>2011-12-03T17:51:15.180-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sql</category><category domain="http://www.blogger.com/atom/ns#">SSIS</category><title>SSIS Packages Loading Woes</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ixrgdxXyY_EI4wekkzNH7MHP9Tg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ixrgdxXyY_EI4wekkzNH7MHP9Tg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ixrgdxXyY_EI4wekkzNH7MHP9Tg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ixrgdxXyY_EI4wekkzNH7MHP9Tg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I'm doing some work on an SSIS package, and I'm also updating the database schema it uses. The package isn't loading and VS appears to be hung. It says in the status bar that is validating the package. Is this what offline mode is for?&lt;br /&gt;
&lt;br /&gt;
It's been like this for 45 minutes. Software today should detect it's in this state and then give the user to skip the validation. How long does it take to drop a column on a table with&amp;nbsp;150,208,363. I guess when you have 8 indexes where the column is included as part of a covering index it can take a while.&lt;br /&gt;
&lt;br /&gt;
Especially when running on virtualized machines....darn you EC2!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-7604752966938816711?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=bhY1dzAkCKA:R9eHybP5AK0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=bhY1dzAkCKA:R9eHybP5AK0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=bhY1dzAkCKA:R9eHybP5AK0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=bhY1dzAkCKA:R9eHybP5AK0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=bhY1dzAkCKA:R9eHybP5AK0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/bhY1dzAkCKA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/bhY1dzAkCKA/ssis-packages-loading-woes.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>0</thr:total><feedburner:origLink>http://jberke.blogspot.com/2011/12/ssis-packages-loading-woes.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-6375558145840684547</guid><pubDate>Thu, 06 Oct 2011 21:50:00 +0000</pubDate><atom:updated>2011-10-06T17:53:46.396-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sql</category><category domain="http://www.blogger.com/atom/ns#">SSIS</category><title>Adding a new GUID column in SSIS</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QX86zeWX-EQGE2QeoOv05AZPzZ4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QX86zeWX-EQGE2QeoOv05AZPzZ4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/QX86zeWX-EQGE2QeoOv05AZPzZ4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QX86zeWX-EQGE2QeoOv05AZPzZ4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I just discovered there is no way in SSIS (at least in SQL2005), to add a new column of type guid. I have found some different work arounds one of which I will share quickly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Add a new Script Component, to your data flow and set the type to transformation.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Edit the component and go to the Inputs/Outputs tab. Under the output add a new column. Make sure it has a data type of Guid (FYI, I have seen references the type is called DT_GUID; however, my version of VS is not functioning properly. My data type field is all black and when I click in it, the edit dialog closes. I set the data type by finding the output column in the xml and setting the dataType attribute to "guid".&lt;/li&gt;
&lt;li&gt;Go to the script tab and in the method add &amp;nbsp;&lt;b&gt;Row.&amp;lt;YourColumnName&amp;gt;&lt;yourcolumnname&gt;=Guid.NewGuid()&lt;/yourcolumnname&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;A very easy work around.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-6375558145840684547?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=gVbBObCTsXo:VBvfThSKNbE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=gVbBObCTsXo:VBvfThSKNbE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=gVbBObCTsXo:VBvfThSKNbE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=gVbBObCTsXo:VBvfThSKNbE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=gVbBObCTsXo:VBvfThSKNbE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/gVbBObCTsXo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/gVbBObCTsXo/adding-new-guid-column-in-ssis.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>0</thr:total><feedburner:origLink>http://jberke.blogspot.com/2011/10/adding-new-guid-column-in-ssis.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-5098459236359039076</guid><pubDate>Wed, 02 Feb 2011 21:30:00 +0000</pubDate><atom:updated>2011-02-02T16:30:31.788-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">tools</category><title>Reflector for free? Not no more...</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Xaa9GRDzuekZNSJJBpq8YFSjLT4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Xaa9GRDzuekZNSJJBpq8YFSjLT4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Xaa9GRDzuekZNSJJBpq8YFSjLT4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Xaa9GRDzuekZNSJJBpq8YFSjLT4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Turns out that &lt;a href="http://www.zdnet.com/blog/burnette/red-gate-we-could-not-make-the-free-model-work-for-us-as-a-commercial-company/2176"&gt;Red-gate has decided not to honor it's promise&lt;/a&gt; to continue to offer reflector for free. Reflector is perhaps one of the most beneficial and well used tools to help .net Framework developers. Show me a developer who doesn't know what reflector is and I'll show you a developer who is just learning .net.&lt;br /&gt;
&lt;br /&gt;
Hopefully c#.next won't modify the IL it generates breaking the tool. But if it does, I guess 35 bucks isn't a lot to pay to avoid having to learn how C# maps to IL and translate it in your head.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-5098459236359039076?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=1FPqNuG5sLY:BcT6twVBubA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=1FPqNuG5sLY:BcT6twVBubA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=1FPqNuG5sLY:BcT6twVBubA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=1FPqNuG5sLY:BcT6twVBubA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=1FPqNuG5sLY:BcT6twVBubA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/1FPqNuG5sLY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/1FPqNuG5sLY/reflector-for-free-not-no-more.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>2</thr:total><feedburner:origLink>http://jberke.blogspot.com/2011/02/reflector-for-free-not-no-more.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-1601409588639574456</guid><pubDate>Thu, 27 Jan 2011 18:10:00 +0000</pubDate><atom:updated>2011-01-27T13:10:14.454-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ruby watir</category><title>Ruby &amp; Watir in Five Minutes</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/52QYB9lDsUovYBAjc8iTPsMe6HM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/52QYB9lDsUovYBAjc8iTPsMe6HM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/52QYB9lDsUovYBAjc8iTPsMe6HM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/52QYB9lDsUovYBAjc8iTPsMe6HM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I have decided it was time to automate some of our web tests for a variety of reasons. If I have to convince you why to automate then your reading the wrong blog. I have choosen to use &lt;a href="http://www.watir.com/"&gt;Watir &lt;/a&gt;(Pronounced Water). Watir is a free open source &lt;a href="http://en.wikipedia.org/wiki/Ruby_(programming_language)"&gt;Ruby &lt;/a&gt;Gem.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I found getting Ruby and Watir up and running to be a fairly smooth process; however, some of the documentation on line wasn't 100% accurate. My goal is to give you the info to get up and running as quickly as possible. &lt;b&gt;The information in this post applies only to Windows&lt;/b&gt;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 1 - Installing Ruby&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href="http://rubyforge.org/frs/?group_id=167"&gt;Install Ruby&lt;/a&gt;&amp;nbsp;- I have had errors using the 1.9.X branch, things run much smoother with 1.8.7&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 2 - Installing Watir as a Ruby Gem&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Open your favorite command prompt, and make sure you have the latest version of Ruby Gem's:&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;gem update --system&lt;/i&gt;&lt;/blockquote&gt;&lt;/li&gt;
&lt;li&gt;Install watir using:&lt;br /&gt;
&lt;blockquote&gt;&lt;i&gt;gem install watir&lt;/i&gt;&lt;/blockquote&gt;&lt;/li&gt;
&lt;li&gt;If you want to use firefox you'll need to install this extension for &lt;a href="http://wiki.openqa.org/download/attachments/13893658/jssh-3.6-WINNT.xpi"&gt;Firefox 3.6&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 3 - Your First Test Case&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
The directions at &lt;a href="http://wiki.openqa.org/display/WTR/Watir+in+5+Minutes"&gt;watir's site&lt;/a&gt;&amp;nbsp;are very good for creating your first test case. The one important detail is before the step where you should enter&lt;i&gt; require 'watir'&lt;/i&gt; you need to do&lt;i&gt; require 'gemsystem'.&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-1601409588639574456?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=vkXc3v25S28:pChd-8C051w:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=vkXc3v25S28:pChd-8C051w:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=vkXc3v25S28:pChd-8C051w:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=vkXc3v25S28:pChd-8C051w:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=vkXc3v25S28:pChd-8C051w:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/vkXc3v25S28" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/vkXc3v25S28/ruby-watir-in-five-minutes.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>0</thr:total><feedburner:origLink>http://jberke.blogspot.com/2011/01/ruby-watir-in-five-minutes.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-6206236930635919814</guid><pubDate>Thu, 20 Jan 2011 18:44:00 +0000</pubDate><atom:updated>2011-01-20T13:44:30.787-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">personal</category><title>Long time no post</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Qf7AzeSJcTIa-AXZBZJIilKKItY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Qf7AzeSJcTIa-AXZBZJIilKKItY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Qf7AzeSJcTIa-AXZBZJIilKKItY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Qf7AzeSJcTIa-AXZBZJIilKKItY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;It's been a very long time since I published something here. So what have I been doing? Over the last year, I have found all my time consumed, between three things, Family, Work and Facebook. I simply never had the time to write any more posts. This year I am going to make more time. How can I do that?&lt;br /&gt;
&lt;br /&gt;
Well since I don't want to give up any time with my family, and I can't give up any time spent on the job, that leaves, facebook. I have blocked my access to 90% of the games that used to drain my time, and removed almost all of the non-friends friends I had. Now it's time to get my priorities aligned up right again.&lt;br /&gt;
&lt;br /&gt;
Although I can't stop working, I have decided to work smarter. There are so many better ways to do the things I have been doing. I am tired of using the all the standard excuses. To that end I have started down the path of automating the testing of our web application. The application has really stabilized itself over the last year as far as functionality in various key areas, that a couple of well thought out automated test scripts should help reduce the&amp;nbsp;amount&amp;nbsp;of time, and effort we spend testing, and reduce the&amp;nbsp;amount&amp;nbsp;of bugs.&lt;br /&gt;
&lt;br /&gt;
I have just started exploring &lt;a href="http://watir.com/"&gt;Watir&lt;/a&gt;&amp;nbsp;and hope to have some posts on it soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-6206236930635919814?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=OmmBcYRkDo0:QKxorZddz9A:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=OmmBcYRkDo0:QKxorZddz9A:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=OmmBcYRkDo0:QKxorZddz9A:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=OmmBcYRkDo0:QKxorZddz9A:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=OmmBcYRkDo0:QKxorZddz9A:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/OmmBcYRkDo0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/OmmBcYRkDo0/long-time-no-post.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>0</thr:total><feedburner:origLink>http://jberke.blogspot.com/2011/01/long-time-no-post.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-1070200237543884138</guid><pubDate>Wed, 24 Feb 2010 19:07:00 +0000</pubDate><atom:updated>2010-02-24T14:07:20.858-05:00</atom:updated><title>Ping box from Yahoo!</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YTMXtUcNADnzW_8f0WW-mK2rpkE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YTMXtUcNADnzW_8f0WW-mK2rpkE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YTMXtUcNADnzW_8f0WW-mK2rpkE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YTMXtUcNADnzW_8f0WW-mK2rpkE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;It had been a long time since I had used Yahoo Messenger; however, I needed to install it and use it the other day, after doing so I found something which I found cool enough to blog about: &lt;a href="http://messenger.yahoo.com/pingbox/"&gt;Yahoo Ping Box!&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
With a couple clicks I was able to embed a yahoo messenger client right inside my blog. Or on any of my other sites / social networks. It was even easier then setting up AdSense. When you enter a nickname, my yahoo client is notified that so and so user has logged in. This is a negative in my opinion, as it pops up a little toast and it doesn't indicate it's from an anonymous source.&lt;br /&gt;
&lt;br /&gt;
However it does warn you when you have an open chat window that it is from an anonymous pingbox user.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-1070200237543884138?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=sAVSL7tHqus:okYD5M0KOr4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=sAVSL7tHqus:okYD5M0KOr4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=sAVSL7tHqus:okYD5M0KOr4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=sAVSL7tHqus:okYD5M0KOr4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=sAVSL7tHqus:okYD5M0KOr4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/sAVSL7tHqus" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/sAVSL7tHqus/ping-box-from-yahoo.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>1</thr:total><feedburner:origLink>http://jberke.blogspot.com/2010/02/ping-box-from-yahoo.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-1418852511695906755</guid><pubDate>Wed, 03 Feb 2010 16:52:00 +0000</pubDate><atom:updated>2010-02-03T11:53:24.893-05:00</atom:updated><title>Get with the times!</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/k4zAeSRwsRvPfLOS-lwVyFBPimc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/k4zAeSRwsRvPfLOS-lwVyFBPimc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/k4zAeSRwsRvPfLOS-lwVyFBPimc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/k4zAeSRwsRvPfLOS-lwVyFBPimc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I was checking my google analytics today (which I haven't done in ages), and I noticed something that was profoundly disturbing. In the last month, roughly 3% of the readers of this blog were using IE6.&lt;br /&gt;
&lt;br /&gt;
Now I have nothing against Microsoft, (obviously since if you read my blog you would realize I develop using their tools), nor am I Microsoft hater; however, as web application developer, I strongly despise everything about IE6.&lt;br /&gt;
&lt;br /&gt;
If your using IE6 or IE7 go&lt;a href="http://www.microsoft.com/windows/internet-explorer/worldwide-sites.aspx"&gt; upgrade&lt;/a&gt; already! Or go use &lt;a href="http://www.mozilla.com/en-US/firefox/upgrade.html"&gt;FireFox&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-1418852511695906755?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=bpRvba9MPTM:oBKYLGEUDic:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=bpRvba9MPTM:oBKYLGEUDic:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=bpRvba9MPTM:oBKYLGEUDic:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=bpRvba9MPTM:oBKYLGEUDic:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=bpRvba9MPTM:oBKYLGEUDic:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/bpRvba9MPTM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/bpRvba9MPTM/get-with-times.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>2</thr:total><feedburner:origLink>http://jberke.blogspot.com/2010/02/get-with-times.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-1409913267298096180</guid><pubDate>Fri, 29 Jan 2010 17:20:00 +0000</pubDate><atom:updated>2010-01-29T12:24:24.384-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.Net</category><title>Skinning a User Control</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GObS2EOocgpa8lZ7gXnJqxGO1UY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GObS2EOocgpa8lZ7gXnJqxGO1UY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GObS2EOocgpa8lZ7gXnJqxGO1UY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GObS2EOocgpa8lZ7gXnJqxGO1UY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;It's been a while since my last post, and while I have many ideas for posts, I have opted to spend my hours either working or enjoying my family; however, I came across a case today which will take only a second to blog about.&lt;br /&gt;
&lt;br /&gt;
ASP.Net supports skinning and themes. If you don't know what that is I suggest you go &lt;a href="http://lmgtfy.com/?q=ASP.Net+Skins"&gt;search &lt;/a&gt;on it. In a site I am working on we have a User Controls, which are being used as Web Parts. A new requirement came up that depending on the theme we are using we will want to change the Title of the web part. So I fire up Visual Studio, and first thing was to add a new item to my skin file:&lt;br /&gt;
&lt;br /&gt;
Navigating to the page resulted in the YSD (Yellow Screen of Death) with an error indicating that myControl couldn't be themed. The next step was to go and add a Themable attribute on the properties in the control I want to skin. You also need to add Themable to the class as well so you end up with:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;[Themable(true)]&lt;br /&gt;
public class myControl : System.Web.UI.UserControl&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; [Themable(true)] &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Title {get;set;}&lt;br /&gt;
}&lt;/blockquote&gt;&lt;br /&gt;
At this point you can not skin your user controls. One thing I did skip is to make sure the skin knows about the user control. You can do this by registering it in the web.config by adding a record to the Pages\Controls section as follows:&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
You can also register it on the skin using the following declaration:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&amp;lt;%@ Register TagPrefix="myComp" TagName="myControl" src="~/Controls/MyControl.ascx" %&amp;gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-1409913267298096180?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=ZFfvMahJAZ8:mLxD_GwzD7E:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=ZFfvMahJAZ8:mLxD_GwzD7E:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=ZFfvMahJAZ8:mLxD_GwzD7E:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=ZFfvMahJAZ8:mLxD_GwzD7E:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=ZFfvMahJAZ8:mLxD_GwzD7E:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/ZFfvMahJAZ8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/ZFfvMahJAZ8/skinning-user-control.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>1</thr:total><feedburner:origLink>http://jberke.blogspot.com/2010/01/skinning-user-control.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-3922630555599384534</guid><pubDate>Wed, 14 Oct 2009 13:43:00 +0000</pubDate><atom:updated>2009-10-14T09:43:59.008-04:00</atom:updated><title>Google &amp; MVPs</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_t0ev1Mq6mKc_4ycciSicnSBwsI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_t0ev1Mq6mKc_4ycciSicnSBwsI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_t0ev1Mq6mKc_4ycciSicnSBwsI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_t0ev1Mq6mKc_4ycciSicnSBwsI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;For those who don't know who &lt;a href="http://meta.stackoverflow.com/questions/9134/jon-skeet-facts"&gt;Jon Skeet&lt;/a&gt; is, he is an excellent contributor to the C# community, through his daily answering of questions on Stack Overflow, to his many excellent articles and books. Jon recently &lt;a href="http://msmvps.com/blogs/jon_skeet/archive/2009/10/01/mvp-no-more.aspx"&gt;posted&lt;/a&gt; that his employer has asked him to turn down the MVP reward for this year.&lt;br /&gt;
&lt;br /&gt;
What employer wouldn't want their employees to be recognized as community leaders in Microsoft Technologies? Google for one, as they are Jon's current employer. Jon won't comment on why this is so it leaves us to speculate what the reasons might be. Even if there is a sensible reason for this the silence lets myself feel that this is due to the competition between the two companies. That has definitely soured my opinion about Google and its Management team.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-3922630555599384534?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=tfwoaeV8AwU:mFwov21-kE4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=tfwoaeV8AwU:mFwov21-kE4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=tfwoaeV8AwU:mFwov21-kE4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=tfwoaeV8AwU:mFwov21-kE4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=tfwoaeV8AwU:mFwov21-kE4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/tfwoaeV8AwU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/tfwoaeV8AwU/google-mvps.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>0</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/10/google-mvps.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-1577976440165092687</guid><pubDate>Thu, 01 Oct 2009 20:07:00 +0000</pubDate><atom:updated>2009-10-01T16:07:30.318-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sql</category><title>Just trust me!!</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1E7fUODPJXItHah8yOPPfhZmfVo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1E7fUODPJXItHah8yOPPfhZmfVo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1E7fUODPJXItHah8yOPPfhZmfVo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1E7fUODPJXItHah8yOPPfhZmfVo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Today I was working with my intern, we are using DotNetNuke to run a marketing site so that our product team can go in and tweak some things. We have custom workflow in there, and a requirement that we want to save the results of the workflow into our own table so we can report on it latter. &lt;br /&gt;
&lt;br /&gt;
The workflow component has some facilities to do this, so he creates a table and a stored proc, and gives it a shot. He is instantly greated with a lovely error in the front end &lt;em&gt;Invalid Syntax Near xyz&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
I tell him that's not good, as it indicates a potential for a Sql injection attack. Fast forward three hours, and he is arguing with me that its safe, that it can't be injected, and demands I prove to him it can be done. &lt;br /&gt;
&lt;br /&gt;
Not wanting to take the time or effort to figure out the magic sequence, as this isn't something I do everyday (Contrary to popular belief, I don't sit around trying to hack). I tell him to trust me, parsing errors are easy to inject into. He doesn't buy it, and I can see he is going to be stubborn until I prove him wrong. &lt;br /&gt;
&lt;br /&gt;
Fast forward&amp;nbsp;ten minutes, and I found that injecting with this forms component was as simple as entering a string like the following for the last field: &lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;&lt;blockquote&gt;&lt;em&gt;injectComing' select * from aspnet_users--&lt;/em&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;/em&gt;Watching with profiler, we quickly saw three key events. First was a Batch Starting which looked something like this:&lt;br /&gt;
&lt;blockquote&gt;exec myProc '','','','injectComing' select*from aspnet_users--';&lt;br /&gt;
&lt;/blockquote&gt;Second was SQL Stmt Starting Event:&lt;br /&gt;
&lt;blockquote&gt;exec myProc '','','','injectComing'&lt;/blockquote&gt;Third was another Sql Stmt Starting Event:&lt;br /&gt;
&lt;blockquote&gt;select*from aspnet_users--';&lt;/blockquote&gt;Needless to say now he is working on a costume module so we can execute the Sql as a parameterized query and avoid all this ass ache. Moral of the story? While you shouldn't always trust everyone, you should trust your boss who has 10 more years of experience.&amp;nbsp;And if you don't you try and prove him wrong, don't demand&amp;nbsp;your boss to prove himself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Gahh Interns!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-1577976440165092687?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=6e3gPcBsGgU:Yq6UlbvTEhU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=6e3gPcBsGgU:Yq6UlbvTEhU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=6e3gPcBsGgU:Yq6UlbvTEhU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=6e3gPcBsGgU:Yq6UlbvTEhU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=6e3gPcBsGgU:Yq6UlbvTEhU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/6e3gPcBsGgU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/6e3gPcBsGgU/just-trust-me.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>1</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/10/just-trust-me.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-4880345493218685795</guid><pubDate>Sat, 26 Sep 2009 16:23:00 +0000</pubDate><atom:updated>2009-09-26T12:23:30.274-04:00</atom:updated><title>Responsability of Third Party Control &amp; Blacklists</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/aDXlJXDd7frdU5MuCJzoVa6V31M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aDXlJXDd7frdU5MuCJzoVa6V31M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/aDXlJXDd7frdU5MuCJzoVa6V31M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aDXlJXDd7frdU5MuCJzoVa6V31M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;My intern just sent me a screen shot of a CAPTCHA from a site we are working. The CAPTCHA is generated by a third party control which we have no control over. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_x1o4p4pyxUQ/Sr4_UbykzzI/AAAAAAAAACs/y6qgON-7Sys/s1600-h/Capture.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_x1o4p4pyxUQ/Sr4_UbykzzI/AAAAAAAAACs/y6qgON-7Sys/s320/Capture.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;If you are a developer of third party controls which are sold to professional companies please take the effort to implement a blacklist of letter sequences that should not be allowed in CAPTCHAs. What are the odds of this happening probally preety small but had we lost a sale because of this....&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-4880345493218685795?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=Lv0_eq48bGY:7mAUlAe_MGU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=Lv0_eq48bGY:7mAUlAe_MGU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=Lv0_eq48bGY:7mAUlAe_MGU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=Lv0_eq48bGY:7mAUlAe_MGU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=Lv0_eq48bGY:7mAUlAe_MGU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/Lv0_eq48bGY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/Lv0_eq48bGY/responsability-of-third-party-control.html</link><author>noreply@blogger.com (Josh Berke)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_x1o4p4pyxUQ/Sr4_UbykzzI/AAAAAAAAACs/y6qgON-7Sys/s72-c/Capture.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/09/responsability-of-third-party-control.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-2454164176071465622</guid><pubDate>Tue, 08 Sep 2009 20:26:00 +0000</pubDate><atom:updated>2009-09-08T16:30:56.049-04:00</atom:updated><title>Telerik Gives Back to the Community</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_BmZ6vOl-kN2fGqviaIh8HLJEN4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_BmZ6vOl-kN2fGqviaIh8HLJEN4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_BmZ6vOl-kN2fGqviaIh8HLJEN4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_BmZ6vOl-kN2fGqviaIh8HLJEN4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;While using &lt;a href="http://stackoverflow.com"&gt;StackOverflow &lt;/a&gt;a great site for asking questions to problems software developers face, I noticed an &lt;a href="https://www.telerik.com/registration-login/stackoverflowregistration.aspx?utm_source=StackOverflow&amp;amp;utm_medium=banner&amp;amp;utm_campaign=PointsPromo_September"&gt;advertisment from Telerik&lt;/a&gt;. They have decided to give any SO user who has over 10,000 reputation points a free developers license to their control suite.&lt;br /&gt;&lt;br /&gt;This is great to see a company see the value a site such as Stackoverflow provides, and to provide some recognition to the people who spend their time helping others by answering questions. Thanks again!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-2454164176071465622?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=pDmgr4yfPHA:K2R8I-S_1iU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=pDmgr4yfPHA:K2R8I-S_1iU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=pDmgr4yfPHA:K2R8I-S_1iU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=pDmgr4yfPHA:K2R8I-S_1iU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=pDmgr4yfPHA:K2R8I-S_1iU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/pDmgr4yfPHA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/pDmgr4yfPHA/telerik-gives-back-to-community.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>0</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/09/telerik-gives-back-to-community.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-4335071326691931281</guid><pubDate>Wed, 26 Aug 2009 20:28:00 +0000</pubDate><atom:updated>2009-08-27T12:46:03.282-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">sql</category><title>Duration in RPC:Completed is Misleading</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xKD-PpKifHyifFnYNKGZYOJEDd4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xKD-PpKifHyifFnYNKGZYOJEDd4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xKD-PpKifHyifFnYNKGZYOJEDd4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xKD-PpKifHyifFnYNKGZYOJEDd4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I discovered something today while troubleshooting a long running query today. We have a specific dialog in our application which in a specific case takes 60 seconds to open up. I fire up SQL Profiler and click run just to see the standard events and verify if this a DB issue or not.&lt;br /&gt;&lt;br /&gt;I find that there is a specific query which does take 60 seconds to run according to the RPC:Completed event (We are using SQL Server 2005). So I pull that query out and run it inside of SSMS, it completes in under a second. These are the issues I hate having to troubleshoot. So the first thing was to rule out our web application, so I create a little .net windows form app and I basically run this:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="FONT-FAMILY: Courier New; BACKGROUND: #e1d5d7; COLOR: black; FONT-SIZE: 10pt"&gt;&lt;pre style="MARGIN: 0px"&gt;sqlCmd.Connection.Open();&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; (&lt;span style="color:blue;"&gt;var&lt;/span&gt; reader = sqlCmd.ExecuteReader())&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;int&lt;/span&gt; i = 0;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;while&lt;/span&gt; (reader.Read())&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        i++;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:#2b91af;"&gt;MessageBox&lt;/span&gt;.Show(i.ToString());&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The query runs fine no issue. Now we are actually using nHibernate so I wanted to simulate us processing the result set. I add a small Thread.Sleep(5) (my result set has 1500 items in it so a small sleep duration is plenty). I run the query and wait about eight seconds.&lt;br /&gt;&lt;br /&gt;Then I go and look at SQL Profiler RPC:Completed (And Stmt:Completed events). The duration for the events is 8 seconds. Now I am asking myself if I opened a ticket with Microsoft burned a support incident for an nHibernate issue or not.&lt;br /&gt;&lt;br /&gt;The moral of the story? Well don't always trust what you think the tool is measuring. And if your interested, when I ran my queries loading the entities through nHibernate with the windows form, the query again completed extremly fast. So I am still hunting this one down.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I found and resolved the issue. It wasn't an issue with SQL but a configuration issue which caused the system to try and log to an invalid file thousands of times which slowed the system down.&lt;br /&gt;&lt;br /&gt;This is very eye-opening as one of my fundamental assumptions about SQL Profiler and how to interpret the results has been crushed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-4335071326691931281?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=QYAozDkND7s:nHb3QGuMX_8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=QYAozDkND7s:nHb3QGuMX_8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=QYAozDkND7s:nHb3QGuMX_8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=QYAozDkND7s:nHb3QGuMX_8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=QYAozDkND7s:nHb3QGuMX_8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/QYAozDkND7s" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/QYAozDkND7s/duration-in-rpccompleted-is-misleading.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>2</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/08/duration-in-rpccompleted-is-misleading.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-5916631185148833695</guid><pubDate>Tue, 14 Jul 2009 14:23:00 +0000</pubDate><atom:updated>2009-07-14T10:59:46.977-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.Net</category><title>Turning off ASP.Net's Unique ID Generation</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PGzvsHoa2Cg4FmBZ2EXq_wEvFsw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PGzvsHoa2Cg4FmBZ2EXq_wEvFsw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PGzvsHoa2Cg4FmBZ2EXq_wEvFsw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PGzvsHoa2Cg4FmBZ2EXq_wEvFsw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;One of the things I am not a fan of (but I understand why they have it), is the unique id generation for server side controls in ASP.Net. The unique Id generation allows the framework to ensure that all controls will have a unique client Id, allowing it avoid collisions.&lt;br /&gt;&lt;br /&gt;While this is great it does add a lot of complexity as you start to move away from the traditional ASP.Net Web Forms model. This complexity is one of the reasons this feature doesn't exist in &lt;a href="http://www.asp.net/mvc/"&gt;ASP.Net MVC&lt;/a&gt;. What are some of the issues with the unique id generation?&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If you have javascript in your pages the controls are given a somewhat dynamic name, this leaves you with two options. Either you dynamically generate your javascript, or you can assume that you won't be moving the control, and can hard code the ID. The ID is based upon a concept of Naming Containers which is beyond the scope of this post. But essentially as long as you don't introduce new containers in the hierarchy the Id will always be the same.&lt;/li&gt;&lt;li&gt;If you want to use post a form to a non-web form page(or different page then the generating page), and want to make use form fields, the field names are associated to their unique id.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The first issue I have always solved by either generating the javascript dynamically in my user controls for example (A user control acts as a naming container and thus all controls in the user control will have it's unique id based on the user control's id). Or by just hard coding the value and hopping I don't change it. &lt;/p&gt;&lt;p&gt;During my latest round of enhancements to my current project I ran into a scenario where I felt I had to disable this unique id generation and couldn't find a workaround that didn't involve rewriting a ton of code. Let me give you some background on the scenario.&lt;/p&gt;&lt;p&gt;This site deals with types of documents, and allows the user to printout (or Email) various PDF files based on the document. There are currently roughly a dozen various printouts and emails which are generated, and the number is always growing. In order to streamline my code and simplify adding new types of printouts, I created a method of doing this which essentially is as follows:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;On the document's details page we have a second form, this form contains all the printing and email options. There are quite a few variations of options, and certain options depend on other options being set. &lt;/li&gt;&lt;li&gt;We preserve the last options used to printout the document, which are set at render time for the page. &lt;/li&gt;&lt;li&gt;The form is smart enough to know which type of printout it is doing and will either open a new window, or reuse the current window when doing a post.&lt;/li&gt;&lt;li&gt;This form posts to an ASP.Net Handler which based on the type of printout directs the request to what I call a print handler. The print handler will either execute (if its sending an email for example), or it might render a new page to let the user see a preview, or it might just generate a PDF for the user. &lt;/li&gt;&lt;li&gt;When generating PDF's we generate the Html and then use a &lt;a href="http://www.blogger.com/www.html-to-pdf.net"&gt;third party tool &lt;/a&gt;to convert it to Html.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;It's actually a pretty slick mechanism and has streamlined a lot of the code. My new requirement is to enable printing from other pages then the Details page. At this point I have two choices. I can either duplicate a subset of my code to allow printing for just document types we need, or I can try and find a way to consolidate this printing framework to make it reusable. &lt;/p&gt;&lt;p&gt;I opted for the second option of course. So the first thing was to move all the markup, script and code behind outside of the details page into its own user control. A quick test showed that some basic functionality is there so I dropped the control onto my new page and things were looking good. This might be possible I thought.&lt;/p&gt;&lt;p&gt;Then I started doing a deeper more thorough testing (And I wish I had an automated unit test for this UI stuff but ah well It's on my ever growing to do list). I quickly found that all the Id's had changed, this messed with all the javscript which enables or disabled options based on what you've selected. &lt;/p&gt;&lt;p&gt;Well we can fix this one easily so I pick one of the controls, and modify the javascript so it is dynamically generated, and things are looking good again. So then I go and printout the most complex of the documents, this time paying close attention to it, and I noticed that none of the options that were set, were being honored. &lt;/p&gt;&lt;p&gt;The issue is the form fields changed so in the old version I was expecting to see a field with id of "printDescription" now it's coming out as "printOptions_printDescription". Furthermore when I drop it into a content page, which happens to user a master page which is also nested, the Id becomes a long mess. So now at this point how can I tell ASP.Net to not auto generate the Id's. I could write my own custom server side controls but that's a lot of work. I could get rid of the server side setting of options but to do that I would now have to either generate all the html dynamically, use code in the markup, or make a second call to get an json representation of the print options and set them on the client.&lt;/p&gt;&lt;p&gt;So let's get back to the original point of this post. I am going to turn off the Unique ID Generation. The first thing is this works if you have a naming container, which you can override properties on. A user control works perfectly, and since a user control doesnt render any markup by default it doesn't change the structure of the page. &lt;/p&gt;&lt;p&gt;I have found that by overriding the following properties results in the control's child control's from picking up the containers uniqueid and appending it.&lt;/p&gt;&lt;div style="BACKGROUND: #e1d5d7;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;override&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; UniqueID&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;get &lt;/span&gt;{ &lt;span style="color:blue;"&gt;return&lt;/span&gt; &lt;span style="color:#a31515;"&gt;""&lt;/span&gt;; }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;override&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Control&lt;/span&gt; NamingContainer&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;get &lt;/span&gt;{ &lt;span style="color:blue;"&gt;return&lt;/span&gt; &lt;span style="color:blue;"&gt;null&lt;/span&gt;;}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="MARGIN: 0px"&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:Red;font-weight:bold"&gt;Caution&lt;/span&gt;&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;I have not tested this beyond my simple usage scenario. I do not know what would happen if these controls were used in a normal postback scenario, if they would be able to pickup their state from the form fields or not.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-5916631185148833695?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=A_Xhg1xB43A:lDYpR-0sxMo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=A_Xhg1xB43A:lDYpR-0sxMo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=A_Xhg1xB43A:lDYpR-0sxMo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=A_Xhg1xB43A:lDYpR-0sxMo:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=A_Xhg1xB43A:lDYpR-0sxMo:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/A_Xhg1xB43A" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/A_Xhg1xB43A/turning-off-aspnets-unique-id.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>6</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/07/turning-off-aspnets-unique-id.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-6933309354504807555</guid><pubDate>Wed, 24 Jun 2009 14:04:00 +0000</pubDate><atom:updated>2009-06-24T10:11:19.228-04:00</atom:updated><title>I need a vacation</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UfrLPKg9z6VxUXCdn1gWq-TLVF4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UfrLPKg9z6VxUXCdn1gWq-TLVF4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UfrLPKg9z6VxUXCdn1gWq-TLVF4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UfrLPKg9z6VxUXCdn1gWq-TLVF4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;So this morning I was thinking about some basic things we can do to speed up the download of our pages, including combining and minifying our JS / CSS files. I decided to go look at &lt;a href="http://www.julienlecomte.net/yuicompressor/"&gt;YuiCompressor&lt;/a&gt;, which is a minifier from Yahoo. &lt;br /&gt;&lt;br /&gt;I think to myself neat let me bookmark that and come back to it. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_x1o4p4pyxUQ/SkIz0M3YcqI/AAAAAAAAACk/yBwOetJlUIc/s1600-h/yuicompressorbookmark.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 161px;" src="http://1.bp.blogspot.com/_x1o4p4pyxUQ/SkIz0M3YcqI/AAAAAAAAACk/yBwOetJlUIc/s320/yuicompressorbookmark.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5350896279169299106" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I guess I had this same thought the last time I thought about the subject. Ugh!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-6933309354504807555?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=lk328zmhAJ4:Lrxs0a1MaB4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=lk328zmhAJ4:Lrxs0a1MaB4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=lk328zmhAJ4:Lrxs0a1MaB4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=lk328zmhAJ4:Lrxs0a1MaB4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=lk328zmhAJ4:Lrxs0a1MaB4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/lk328zmhAJ4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/lk328zmhAJ4/i-need-vacation.html</link><author>noreply@blogger.com (Josh Berke)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_x1o4p4pyxUQ/SkIz0M3YcqI/AAAAAAAAACk/yBwOetJlUIc/s72-c/yuicompressorbookmark.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/06/i-need-vacation.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-5082609809069075302</guid><pubDate>Mon, 08 Jun 2009 19:47:00 +0000</pubDate><atom:updated>2009-06-08T17:00:32.953-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.Net</category><title>How not to use a user control</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XYGSD9GWNVw4mY7yvQbqpFbG99Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XYGSD9GWNVw4mY7yvQbqpFbG99Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XYGSD9GWNVw4mY7yvQbqpFbG99Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XYGSD9GWNVw4mY7yvQbqpFbG99Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I am in the middle of a nice refactoring session, changing a setup dialog, which allowed you to edit 4 types of email templates. Since the data was the same I had a user control which was then placed on four different tabs.&lt;br /&gt;&lt;br /&gt;We are going to tripple the number of types of emails that are going to be configured. So now my simple dialog of four tabs explodes into 12, and while I do not claim to be a UX expert by any means, and I am not able to design the latest slickest easiest to use interface; I can recognize a bad UI very easily.&lt;br /&gt;&lt;br /&gt;I have decided to use a drop downlist paradigm where the user selects from the drop down the template they are going to work with, and then we present them this information.&lt;br /&gt;&lt;br /&gt;During my refactoring I stripped out my tabs and added the drop down. I removed all but one instance of my user control. I have everything working except I'd like for drop down to line up better with the contents of the user control.&lt;br /&gt;&lt;br /&gt;The html that gets rendered is like this:&lt;br /&gt;&lt;br /&gt;&lt;div style="BACKGROUND: #e1d5d7;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        Select a Template:&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;select&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;option&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;option&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;select&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:green;"&gt;&amp;lt;!--This table comes my user control --&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;table&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;tbody&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;tr&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                    &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;td&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                        Item 1:&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                    &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;td&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                    &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;td&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                        &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;input&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                    &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;td&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;tr&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;tbody&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;table&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;    &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;div&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The problem is the select template doesn't line up with the rest of the labels. This lead me to the ahhahh moment that lead to this post. I do not recommend doing this in production code. I think it makes the code very unreadable.&lt;br /&gt;&lt;br /&gt;Nothing says that the user control must render a valid html fragment. Using that to my advantage I modified the code so my aspx page looks like:&lt;br /&gt;&lt;br /&gt;&lt;div style="BACKGROUND: #e1d5d7;font-family:Courier New;font-size:10pt;color:black;"   &gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;        &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;table&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;tr&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;td&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                    Select A Template:&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;td&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;td&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                    &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;asp&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DropDownList&lt;/span&gt; &lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:blue;"&gt;="server"&lt;/span&gt; &lt;span style="color:red;"&gt;ID&lt;/span&gt;&lt;span style="color:blue;"&gt;="DropDownList1"&lt;/span&gt; &lt;span style="color:red;"&gt;AutoPostBack&lt;/span&gt;&lt;span style="color:blue;"&gt;="true"&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt; &lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                    &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;asp&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;DropDownList&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;                &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;td&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#a31515;"&gt;tr&lt;/span&gt;&lt;span style="color:blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="MARGIN: 0px"&gt;            &lt;span style="color:blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#a31515;"&gt;croixUser&lt;/span&gt;&lt;span style="color:blue;"&gt;:&lt;/span&gt;&lt;span style="color:#a31515;"&gt;emailConfig&lt;/span&gt; &lt;span style="color:red;"&gt;runat&lt;/span&gt;&lt;span style="color:blue;"&gt;="server"&lt;/span&gt;  &lt;span style="color:blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is basically my entire, I never close the table in the page, I do that in the user control. While we shouldn't be able to do this it makes sense that Microsoft hasn't wasted any energy in blocking this. If you want to shoot your own foot off with convoluted code go ahead. &lt;br /&gt;&lt;br /&gt;Now I must be off to refactor that user control to dev\null&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-5082609809069075302?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=X5bszdOcZbs:BSRxdIeYcEU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=X5bszdOcZbs:BSRxdIeYcEU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=X5bszdOcZbs:BSRxdIeYcEU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=X5bszdOcZbs:BSRxdIeYcEU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=X5bszdOcZbs:BSRxdIeYcEU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/X5bszdOcZbs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/X5bszdOcZbs/how-not-to-use-user-control.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>1</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/06/how-not-to-use-user-control.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-4813371897287923802</guid><pubDate>Wed, 03 Jun 2009 19:45:00 +0000</pubDate><atom:updated>2009-06-11T10:29:02.684-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><title>Jquery 1.3.2 &amp; Intellisense in Visual Studio 2008</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cth2ezT2ICtXfdsfLJ9xIyVY0A8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cth2ezT2ICtXfdsfLJ9xIyVY0A8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cth2ezT2ICtXfdsfLJ9xIyVY0A8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cth2ezT2ICtXfdsfLJ9xIyVY0A8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;After following the &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx"&gt;directions&lt;/a&gt; to get intellisense working with the latest version of jquery, I ran into some issues.&lt;br /&gt;&lt;br /&gt;First I would get this error:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Error updating JScript IntelliSense: D:\Source\...\JS\jquery\jquery-1.3.2.js: Object doesn't support this property or method @ 18:9345&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The first problem is that the file which has the enhanced comments for intellisense is named jquery-1.3.2-vsdoc2.js. Visual Studio is looking for a *vsdoc.js. Make sure you rename the file to jquery-1.3.2-vsdoc.js.&lt;br /&gt;&lt;br /&gt;After renaming the file I was greated with this lovely error:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Error updating JScript IntelliSense: D:\Source\...\JS\jquery\jquery-1.3.2-vsdoc.js: 'div.childNodes' is null or not an object @ 1487:1&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;My understanding is that the code inside the methods doesn't really matter (Assuming it's not changing the object definitions of course). Since this code will never be ran, I simply removed line 1488 which looks like:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;elem = jQuery.makeArray(div.childNodes);&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And now we have intellisense working with jquery 1.3.2&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_x1o4p4pyxUQ/SibXUN94wjI/AAAAAAAAAAk/5evDR-q8540/s1600-h/vsintellisenseworking.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 320px; DISPLAY: block; HEIGHT: 91px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5343194750268260914" border="0" alt="" src="http://1.bp.blogspot.com/_x1o4p4pyxUQ/SibXUN94wjI/AAAAAAAAAAk/5evDR-q8540/s320/vsintellisenseworking.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;&lt;span style='font-weight:bold'&gt;Edit&lt;/span&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;I've noticed a lot of traffic recently on this post, if this post has helped resolve your issue (or not helped) leave a comment let others know.&lt;br /&gt;&lt;br /&gt;Thank you and good luck&lt;br /&gt;&lt;br /&gt;-jb&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-4813371897287923802?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=8g3URqANFH8:PXuwb3v9pao:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=8g3URqANFH8:PXuwb3v9pao:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=8g3URqANFH8:PXuwb3v9pao:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=8g3URqANFH8:PXuwb3v9pao:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=8g3URqANFH8:PXuwb3v9pao:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/8g3URqANFH8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/8g3URqANFH8/jquery-132-intellisense-in-visual.html</link><author>noreply@blogger.com (Josh Berke)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_x1o4p4pyxUQ/SibXUN94wjI/AAAAAAAAAAk/5evDR-q8540/s72-c/vsintellisenseworking.png" height="72" width="72" /><thr:total>18</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/06/jquery-132-intellisense-in-visual.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-7200013906209229180</guid><pubDate>Thu, 21 May 2009 16:44:00 +0000</pubDate><atom:updated>2009-09-02T04:28:38.251-04:00</atom:updated><title>One more VSS bites the dust</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Kf0OAny_v-xZ-44TibOAH_RbNI4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Kf0OAny_v-xZ-44TibOAH_RbNI4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Kf0OAny_v-xZ-44TibOAH_RbNI4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Kf0OAny_v-xZ-44TibOAH_RbNI4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I am happy to announce, that I have just my finished my second VSS to TFS migration, and I hope and pray that I will never be forced to open up VSS again. Yahooo!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-7200013906209229180?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=T1NjOpGUtcI:IReurJVOZkc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=T1NjOpGUtcI:IReurJVOZkc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=T1NjOpGUtcI:IReurJVOZkc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=T1NjOpGUtcI:IReurJVOZkc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=T1NjOpGUtcI:IReurJVOZkc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/T1NjOpGUtcI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/T1NjOpGUtcI/one-more-vss-bites-dust.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>0</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/05/one-more-vss-bites-dust.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-5763031809730082585</guid><pubDate>Tue, 19 May 2009 17:26:00 +0000</pubDate><atom:updated>2009-05-19T13:36:47.571-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.Net</category><category domain="http://www.blogger.com/atom/ns#">ComponentArt</category><title>Rendering ComponentArt's Splitter in Firefox</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ROXl7N08Ma9sLrdu753ttl9YIe4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ROXl7N08Ma9sLrdu753ttl9YIe4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ROXl7N08Ma9sLrdu753ttl9YIe4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ROXl7N08Ma9sLrdu753ttl9YIe4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;I've been working a little bit to add support for FireFox in my application which has only supported IE6 and better. I am trying to be proactive knowing one day my boss will ask for this, and it is actually helping to cleanup the markup we have quite a bit. &lt;br /&gt;&lt;br /&gt;Along this journey, I noticed that we have a splitter bar, which has a tree view in one pane and a tree view in a second pane. It is a two pane vertical split. In IE6,7 and 8 (even in standards mode), the pane rendered correctly. When viewed in Firefox the first pane was shown; however, the second pane wasn't being rendered. It looked like the splitter container width was being set to the width of the first pane, which caused that pane to take up the entire container. &lt;br /&gt;&lt;br /&gt;After working with Component Art's support team, it was noticed that when you resize the window, the pane would then render correctly. With their help, we found the following to force the splitters to render correctly in firefox.&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: Courier New; font-size: 10pt; color: black; background: #e1d5d7;"&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&lt;span style="color: blue;"&gt;function&lt;/span&gt; splitter_load() {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (jQuery.browser.mozilla) {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; splitter.element.style.width = &lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; $(&lt;span style="color: #a31515;"&gt;"#divBidSummary"&lt;/span&gt;).width() + &lt;span style="color: #a31515;"&gt;"px"&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; splitter.adjustSize(&lt;span style="color: blue;"&gt;true&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;myContainer is a div which I have set to a width of 99% of it's parent. This allows the splitter to grow and shrink as the page is resized. This sample uses &lt;a href="http://jquery.com"&gt;jquery&lt;/a&gt;, which is an excellant javascript library.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note:&lt;/b&gt; Thanks goes out to Hwan to helping to track down and develop a work around for this solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-5763031809730082585?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=YWV77Wa9wyk:z6cd8rui44M:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=YWV77Wa9wyk:z6cd8rui44M:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=YWV77Wa9wyk:z6cd8rui44M:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=YWV77Wa9wyk:z6cd8rui44M:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=YWV77Wa9wyk:z6cd8rui44M:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/YWV77Wa9wyk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/YWV77Wa9wyk/rendering-componentarts-splitter-in.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>1</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/05/rendering-componentarts-splitter-in.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-3300148520175961660</guid><pubDate>Tue, 19 May 2009 16:12:00 +0000</pubDate><atom:updated>2009-05-19T12:38:43.438-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP.Net</category><category domain="http://www.blogger.com/atom/ns#">ComponentArt</category><title>Automatic text selection with Compenant Art's Tree View</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/J6Fp8sgJd9vQR4T9DwmXCEi-K3o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/J6Fp8sgJd9vQR4T9DwmXCEi-K3o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/J6Fp8sgJd9vQR4T9DwmXCEi-K3o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/J6Fp8sgJd9vQR4T9DwmXCEi-K3o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Over the last year I have been using &lt;a href="http://www.componentart.com/"&gt;Component Art's&lt;/a&gt; Web UI suite. I have a love hate relationship with their controls. I love how they are quick and easy to get some advanced UI functionality into your site. I hate their documentation and that some features which I would consider basic seem to be missing. I also want to take a moment and say they have a great tech support team, who has helped me quite a bit over the last year. But overall I would recommend the controls.&lt;br /&gt;&lt;br /&gt;In a recent project, I had a tree view, which the user could create their own nested heirarchial tree, they could move the nodes around, and it worked very simillar to the experience you get with Windows Explorer. One minor feature which was missing, that I had wanted (and some of my test user's also asked for), was that when you go to edit the name of the node, select the text for them. &lt;br /&gt;&lt;br /&gt;This is a basic UI paradigm that if I go to edit something it automaticly selects itself. When you look at the TreeView control you will see there is no event that indicates that a node is being edited; however, if you don't mind mucking around with a thrid party object (This is something that should not be done lightly CA makes no promises that this will work in future versions) there is a way to do this.&lt;br /&gt;&lt;br /&gt;If you examine the TreeViewNode object you will find a method called Edit which is called when a node is supposed to go into Edit mode. By overridding this method we can provide our own implementation for method. The following code copies the Edit function into a new function EditOriginal. It then creates a new Edit function which calls the original function. The new function then uses &lt;a href="http://jquery.com/"&gt;Jquery&lt;/a&gt; to select an input which is a child of a TreeView class. If your not using &lt;a href="http://jquery.com/"&gt;Jquery&lt;/a&gt; or if your page structure is different you might need to modify that code to find the input element, and then select it.&lt;br /&gt; &lt;br /&gt;&lt;div style="font-family: Courier New; font-size: 10pt; color: black; background: #e1d5d7;"&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ComponentArt_TreeViewNode.prototype.EditOriginal = ComponentArt_TreeViewNode.prototype.Edit;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ComponentArt_TreeViewNode.prototype.Edit = &lt;span style="color: blue;"&gt;function&lt;/span&gt;() {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;this&lt;/span&gt;.EditOriginal();&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $(&lt;span style="color: #a31515;"&gt;'.TreeView input'&lt;/span&gt;).select();&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;There is an EditNodeCSS property which I was unable to get a selector working with it. If anyone does get a selection working off that let me know. I'd love to know where in the dom its used and when I try and look at it with my tools the node leaves edit mode.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note:&lt;/b&gt; I want to thank Stephen Hatcher of Component Art's Tech Support team for his assistance in coming up with this solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-3300148520175961660?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=Oj3JejjJ_SY:NRxsNmmC4Tg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=Oj3JejjJ_SY:NRxsNmmC4Tg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=Oj3JejjJ_SY:NRxsNmmC4Tg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=Oj3JejjJ_SY:NRxsNmmC4Tg:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=Oj3JejjJ_SY:NRxsNmmC4Tg:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/Oj3JejjJ_SY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/Oj3JejjJ_SY/automatic-text-selection-with-compenant.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>0</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/05/automatic-text-selection-with-compenant.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-2616610547564661776</guid><pubDate>Fri, 15 May 2009 15:34:00 +0000</pubDate><atom:updated>2009-05-15T11:48:18.197-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">css</category><title>Centering Box Elements in HTML with CSS</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/a3TFEVxCyiGiNN43HvX62esKSts/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a3TFEVxCyiGiNN43HvX62esKSts/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/a3TFEVxCyiGiNN43HvX62esKSts/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a3TFEVxCyiGiNN43HvX62esKSts/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Most of my carreer I have been a "backend" guy, working on the database, and building services for consumption by other systems. Over the last couple of years I have had the pleasure of becoming a "frontend" guy, working on various web sites.&lt;br /&gt;&lt;br /&gt;So far the site I have been working on only targets IE, As such there hasn't been a strong motiviation to add support for Firefox; however, with IE8 being much more standards compliant, I have a personal desire to get the site to a point where I can turn off IE7 Compatability Mode. &lt;br /&gt;&lt;br /&gt;Today I was a little stumped when I was working on markup simillar to the following:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: Courier New; font-size: 10pt; color: black; background: #e1d5d7;"&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;div&lt;/span&gt; &lt;span style="color: red;"&gt;style&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: red;"&gt;text-align&lt;/span&gt;: &lt;span style="color: blue;"&gt;center"&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;table&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;td&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; I am Centered&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;td&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;table&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In IE8 with Compatability mode this renders as I expect. The table is centered within the div; however, in Firefox and IE8 standard mode the table is left aligned. &lt;br /&gt;&lt;br /&gt;I've always questioned why am I using text-align to align elements, but it always worked so I just shrugged and moved on. Turns out IE wasn't honoring that text-align should only align text. It was using to align all elements. The proper way to do this is:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: Courier New; font-size: 10pt; color: black; background: #e1d5d7;"&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;table&lt;/span&gt; &lt;span style="color: red;"&gt;style&lt;/span&gt;&lt;span style="color: blue;"&gt;="&lt;/span&gt;&lt;span style="color: red;"&gt;margin-left&lt;/span&gt;:&lt;span style="color: blue;"&gt;auto&lt;/span&gt;;&lt;span style="color: red;"&gt;margin-right&lt;/span&gt;:&lt;span style="color: blue;"&gt;auto"&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;td&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; I am Centered&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;td&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;tr&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;table&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;div&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is so much better. I hated having to use text-align center, and then go through and set all the text up so it would align back left. I have tested this in Firefox 3.0.7 and IE8 (IE7 and Standards Mode). It feels to good finally learn the right way to do something.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-2616610547564661776?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=V6fupn213AI:WdOMIQDX1ag:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=V6fupn213AI:WdOMIQDX1ag:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=V6fupn213AI:WdOMIQDX1ag:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=V6fupn213AI:WdOMIQDX1ag:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=V6fupn213AI:WdOMIQDX1ag:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/V6fupn213AI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/V6fupn213AI/centering-box-elements-in-html-with-css.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>1</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/05/centering-box-elements-in-html-with-css.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-586182704410437627</guid><pubDate>Tue, 05 May 2009 19:15:00 +0000</pubDate><atom:updated>2009-05-08T10:49:12.059-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><title>Dynamic Expression</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/foIQme4yO-2dCunu6iERz26IDtw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/foIQme4yO-2dCunu6iERz26IDtw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/foIQme4yO-2dCunu6iERz26IDtw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/foIQme4yO-2dCunu6iERz26IDtw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Scott Gu has a good &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx"&gt;article&lt;/a&gt; about a great sample component called Dynamic Linq. This is a very powerful addition to your linq toolkit which lets you create expressions based on strings. So imagine that you want to add sorting to a grid which is bound to a List&lt;BusinessObject&gt;. One way would be to have a switch statement for each options (Yes you can throw up I'll wait).&lt;br /&gt;&lt;br /&gt;Another way would be to use the dynamic query library. I've always wondered how difficult it would be to create an Expression dynamically. This would be a nice addition to my Audit Logger allowing for the configuration of an audit category to exist outside of the code.&lt;br /&gt;&lt;br /&gt;Much of this code came from &lt;a href="http://stackoverflow.com/questions/802789/extension-method-to-sort-a-list-within-a-parent-object/802845#802845"&gt;this stackoverflow.com article&lt;/a&gt;. I simply went and added the glue:&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; Sort&amp;lt;T&amp;gt;(&lt;span style="color: blue;"&gt;this&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;IEnumerable&lt;/span&gt;&amp;lt;T&amp;gt; source,&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;string&lt;/span&gt; sortExpression, &lt;span style="color: blue;"&gt;bool&lt;/span&gt; desc)&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;var&lt;/span&gt; param = &lt;span style="color: #2b91af;"&gt;Expression&lt;/span&gt;.Parameter(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(T), &lt;span style="color: blue;"&gt;string&lt;/span&gt;.Empty);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;var&lt;/span&gt; fields = sortExpression.Split(&lt;span style="color: #a31515;"&gt;'.'&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af;"&gt;Expression&lt;/span&gt; property = &lt;span style="color: blue;"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af;"&gt;Expression&lt;/span&gt; parentParam = param;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;var&lt;/span&gt; field &lt;span style="color: blue;"&gt;in&lt;/span&gt; fields)&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; property = &lt;span style="color: #2b91af;"&gt;Expression&lt;/span&gt;.Property(parentParam, field);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; parentParam = property;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;var&lt;/span&gt; sortLambda = &lt;span style="color: #2b91af;"&gt;Expression&lt;/span&gt;.Lambda&amp;lt;&lt;span style="color: #2b91af;"&gt;Func&lt;/span&gt;&amp;lt;T, &lt;span style="color: blue;"&gt;object&lt;/span&gt;&amp;gt;&amp;gt;(&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af;"&gt;Expression&lt;/span&gt;.Convert(property, &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: blue;"&gt;object&lt;/span&gt;)),&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; param);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (desc)&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; source.AsQueryable&amp;lt;T&amp;gt;().OrderByDescending&amp;lt;T, &lt;span style="color: blue;"&gt;object&lt;/span&gt;&amp;gt;(sortLambda);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; source.AsQueryable&amp;lt;T&amp;gt;().OrderBy&amp;lt;T, &lt;span style="color: blue;"&gt;object&lt;/span&gt;&amp;gt;(sortLambda);&lt;/pre&gt;&lt;br /&gt;&lt;pre style="margin: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Basically this will give you an expression which returns the value of a property. It will support property / field invocation so myObject.MyField.MyProperty. It works by creating an expression which represents the type of parameter being pased in to the lambda.&lt;br /&gt;&lt;br /&gt;Then it builds an expression tree by chaining new expressions together for each token myObject, myField etc. Finally it creates a lambda which can be executed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-586182704410437627?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=41TDtM8D0Fk:Ndln9jG0-9I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=41TDtM8D0Fk:Ndln9jG0-9I:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=41TDtM8D0Fk:Ndln9jG0-9I:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=41TDtM8D0Fk:Ndln9jG0-9I:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=41TDtM8D0Fk:Ndln9jG0-9I:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/41TDtM8D0Fk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/41TDtM8D0Fk/dynamic-expression.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>3</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/05/dynamic-expression.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3277088726597339855.post-6152444682046097653</guid><pubDate>Wed, 29 Apr 2009 18:19:00 +0000</pubDate><atom:updated>2009-04-29T14:31:08.082-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><title>MVC For IDE's</title><description>&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tFAYyL723HOV7Psxshei6LW20VE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tFAYyL723HOV7Psxshei6LW20VE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tFAYyL723HOV7Psxshei6LW20VE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tFAYyL723HOV7Psxshei6LW20VE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;Recently I had the pleasure of helping out a former employer of mine resolve a couple minor issues that have come up since my departure. During this time I had a revelation about how we treat our source code today, and how we should treat it tomorrow. &lt;br /&gt;&lt;br /&gt;When I worked for this company I became the sole developer, and was able to define my own coding standards. Overtime all of the source files were updated, as I made changes to them, and was able to use Reformat Document tool in Visual Studio. &lt;br /&gt;&lt;br /&gt;Since I have left, a new developer has taken ownership of all the projects I was working on. Said developer prefers a different style to their code. For example. I prefer all braces to start on a new line where as he prefers all opening braces to exist on the parent line.&lt;br /&gt;&lt;br /&gt;What does this have to do with how we treat source code? Well imagine this scenario. I open up a large class file, and remove a single using statement from the top of the file. Upon saving the file, visual studio applies my formatting rules which I defined. This results in my one line change to cascade into hundreds of changes.&lt;br /&gt;&lt;br /&gt;The question I pose then is why do our tools treat non-significant characters such as extra white space as significant when comparing two versions of the code? Shouldn't our development tools store the source code in as compact a format as possible and allow us to define our own personal views of the source code? Two developers on the same team should be able to read the same source code formatted how they like to see it.&lt;br /&gt;&lt;br /&gt;Perhaps Visual Studio should be written as a MVC, and allow us to define our own views seperate from the source code. &lt;br /&gt;&lt;br /&gt;Writting this reminded me of when I worked on VB6 applications and one developer would check out a file and the casing of all the variables would change. What a nightmare. Again the source code should be treated as data rendered into a view by the IDE.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3277088726597339855-6152444682046097653?l=jberke.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Berke?a=n6QdccW1akI:Q68Z35oP8c0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=n6QdccW1akI:Q68Z35oP8c0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=n6QdccW1akI:Q68Z35oP8c0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Berke?a=n6QdccW1akI:Q68Z35oP8c0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Berke?i=n6QdccW1akI:Q68Z35oP8c0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Berke/~4/n6QdccW1akI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/Berke/~3/n6QdccW1akI/mvc-for-ides.html</link><author>noreply@blogger.com (Josh Berke)</author><thr:total>1</thr:total><feedburner:origLink>http://jberke.blogspot.com/2009/04/mvc-for-ides.html</feedburner:origLink></item></channel></rss>

