<?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:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Nuno Gomes /* Code Adventures */</title>
    <description>var myInterests = new { language : "C#", technology: "ASP.NET" };</description>
    <link>http://blog.nunogomes.net/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.4.5.6</generator>
    <language>en-GB</language>
    <blogChannel:blogRoll>http://blog.nunogomes.net/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>Nuno Gomes</dc:creator>
    <dc:title>Nuno Gomes /* Code Adventures */</dc:title>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/NunoGomes" /><feedburner:info uri="nunogomes" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>ELWEA - EventLog WebEvent Aggregator for ASP.NET</title>
      <description>&lt;p&gt;Last time I wrote about &lt;a href="http://nunogomes.net/post/2008/08/25/ASPNET-HealthMonitoring-EventLogWebEventProvider(Part-3).aspx" target="_blank"&gt;Health Monitoring was during 2008&lt;/a&gt; and since then I ‘m using, on a daily basis, a complex Health Monitoring EventLog provider to aggregate WebEvents from specific ASP.NET web applications.&lt;/p&gt;  &lt;p&gt;Last year I found &lt;a href="http://code.google.com/p/elmah/" target="_blank"&gt;ELMAH (Error Logging Module and Handler) project&lt;/a&gt; and became a fan of the concept: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;“[…] facility that is completely pluggable. It can be dynamically added to a running &lt;/em&gt;&lt;a href="http://www.asp.net/"&gt;&lt;em&gt;ASP.NET&lt;/em&gt;&lt;/a&gt;&lt;em&gt; web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment.”&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;It didn’t take much time until I start thinking&amp;#160; about releasing a version of my EventLog WebEvents aggregator.&lt;/p&gt;  &lt;p&gt;I’m now happy to announce that I finally made this project available at &lt;a href="http://codeplex.com/" target="_blank"&gt;Codeplex&lt;/a&gt; and name it: &lt;a href="http://elwea.codeplex.com/" target="_blank"&gt;ELWEA - EventLog WebEvent Aggregator for ASP.NET&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;While different in nature this project main goal is pretty similar to the ELMAH project: keep an ASP.NET web application error tracking isolated and easily accessible.&lt;/p&gt;  &lt;p&gt;What makes this project different from many other like ELMAH is the fact that it's not focused on handling and persisting error info. This project main goal is to aggregate all EventLog data belong to a specific web application under a specific EventLog source name.&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p align="center"&gt;Before&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=elwea&amp;amp;DownloadId=227438" width="506" height="146" /&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p align="center"&gt;After&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=elwea&amp;amp;DownloadId=230377" width="509" height="137" /&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;I’m sure that web developer and web site administrators will love it but I think that also IT pros that manage shared hosting environments will use it.&lt;/p&gt;  &lt;p&gt;Visit &lt;a href="http://elwea.codeplex.com/" target="_blank"&gt;here&lt;/a&gt; for a more complete description and &lt;a href="http://elwea.codeplex.com/documentation" target="_blank"&gt;here&lt;/a&gt; for the project documentation.&lt;/p&gt;  &lt;p&gt;To make your live even simpler I’m planning to make a &lt;a href="http://nuget.codeplex.com/" target="_blank"&gt;NuGet&lt;/a&gt; package available for ELWEA. Keep an eye on this.&lt;/p&gt;  &lt;p&gt;Enjoy it!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ripRkeq5bIXYZvnb2ZYzdJWGzck/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ripRkeq5bIXYZvnb2ZYzdJWGzck/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/ripRkeq5bIXYZvnb2ZYzdJWGzck/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ripRkeq5bIXYZvnb2ZYzdJWGzck/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/t-HsPMkjqW4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/t-HsPMkjqW4/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2011/04/27/ELWEA-EventLog-WebEvent-Aggregator-for-ASPNET.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=01ba7394-0e40-4f5e-b65b-c66a87987233</guid>
      <pubDate>Wed, 27 Apr 2011 13:48:31 -1300</pubDate>
      <category>ASP.NET</category>
      <category>CodeProject</category>
      <category>.NET</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=01ba7394-0e40-4f5e-b65b-c66a87987233</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=01ba7394-0e40-4f5e-b65b-c66a87987233</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2011/04/27/ELWEA-EventLog-WebEvent-Aggregator-for-ASPNET.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=01ba7394-0e40-4f5e-b65b-c66a87987233</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=01ba7394-0e40-4f5e-b65b-c66a87987233</feedburner:origLink></item>
    <item>
      <title>.NET – ArrayList hidden gem</title>
      <description>&lt;p&gt;From time to time I end-up finding really old hidden gems and a few days ago I found another one.&lt;/p&gt;  &lt;blockquote&gt;   &lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.collections.arraylist.readonly(v=vs.71).aspx" target="_blank"&gt;IList System.Collections.ArrayList.ReadOnly(IList list)&lt;/a&gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/blockquote&gt;

&lt;p&gt;This amazing method is available since the beginning (.NET 1.0).&lt;/p&gt;

&lt;p&gt;I always complain about the small support for ReadOnly lists and collections and I have no clue why I miss this one.&lt;/p&gt;

&lt;p&gt;For those of you that have to maintain and extend legacy applications prior to ASP.NET 2.0 SP2 this could be a very useful finding.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tatoLYNcSOp07lixbn_cICYZ4_w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tatoLYNcSOp07lixbn_cICYZ4_w/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/tatoLYNcSOp07lixbn_cICYZ4_w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tatoLYNcSOp07lixbn_cICYZ4_w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/n0bDnvYoH8U" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/n0bDnvYoH8U/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2011/02/03/NET-e28093-ArrayList-hidden-gem.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=1ee6146e-8dd5-49d2-9acd-48ff30dadacc</guid>
      <pubDate>Thu, 03 Feb 2011 12:50:56 -1300</pubDate>
      <category>.NET</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=1ee6146e-8dd5-49d2-9acd-48ff30dadacc</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=1ee6146e-8dd5-49d2-9acd-48ff30dadacc</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2011/02/03/NET-e28093-ArrayList-hidden-gem.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=1ee6146e-8dd5-49d2-9acd-48ff30dadacc</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=1ee6146e-8dd5-49d2-9acd-48ff30dadacc</feedburner:origLink></item>
    <item>
      <title>ASP.NET Controls - System.Web.UI.HtmlControls.HtmlButton client click hits the server twice</title>
      <description>&lt;p&gt;Hi all,&lt;/p&gt;  &lt;p&gt;At work we have about 5000 PC's that are mainly our commercial network. All those PC use intranet services and web applications.&lt;/p&gt;  &lt;p&gt;Until a few months ago IE6 was our corporate browser (yep) but we ended moving to IE8.&lt;/p&gt;  &lt;p&gt;A few days ago someone came to me saying that their application appears to have some problem because every time they click some HTML buttons the server gets two hits.&lt;/p&gt;  &lt;p&gt;Also they are able to say that this didn't happen when they used the IE6.&lt;/p&gt;  &lt;p&gt;In the faulty application the buttons that trigger two posts were System.Web.UI.HtmlControls.HtmlButton controls with Click event handlers registered. &lt;/p&gt;  &lt;p&gt;After some research I found that the default type attribute value for HTML BUTTON element has changed in IE8 and later (&lt;a href="http://msdn.microsoft.com/en-us/library/ms534696(v=VS.85).aspx"&gt;here&lt;/a&gt;). &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;In IE7 and earlier the default value is 'button' &lt;/li&gt;    &lt;li&gt;In IE8 and later the default value is 'submit' &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This changed in browser default behavior was not reflected in the Server-Control that renders it: it doesn't set the type attribute value to button when a postback is required.&lt;/p&gt;  &lt;p&gt;Without such change, every time we attached a Click event handler to a HtmlButton we endup with two posts: one triggered by the _doPostback function and another from the form itself (caused by the default type='submit' value.).&lt;/p&gt;  &lt;p&gt;I easily bypass this problem by setting the type attribute value to 'button' in my base control.&lt;/p&gt;  &lt;p&gt;Even so, I think that this change should be done by the framework itself when a postback is required in a HtmlButton.&lt;/p&gt;  &lt;p&gt;After some 'reflection' I propose changing the System.Web.UI.Util.WriteOnClickAttribute method to do the job.&lt;/p&gt;  &lt;p&gt;Such change would ensure the some behavior independent of the browser version.&lt;/p&gt;  &lt;p&gt;If you have another workaround or you think I'm completely wrong please let me know. &lt;/p&gt;  &lt;p&gt;Also if you think this is a real problem that should be solved then visit this &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/details/612858/htmlbutton-client-click-hits-the-server-twice"&gt;Connect entry&lt;/a&gt; I create.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mdKdGI9ONGwX5NYeERBAsIrPYpI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mdKdGI9ONGwX5NYeERBAsIrPYpI/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/mdKdGI9ONGwX5NYeERBAsIrPYpI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mdKdGI9ONGwX5NYeERBAsIrPYpI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/pg7oUOJRMKI" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/pg7oUOJRMKI/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2010/10/14/ASPNET-Controls-SystemWebUIHtmlControlsHtmlButton-client-click-hits-the-server-twice.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=a5562015-2ce5-4933-850b-5729279d4cb1</guid>
      <pubDate>Thu, 14 Oct 2010 19:43:17 -1300</pubDate>
      <category>ASP.NET</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=a5562015-2ce5-4933-850b-5729279d4cb1</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=a5562015-2ce5-4933-850b-5729279d4cb1</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2010/10/14/ASPNET-Controls-SystemWebUIHtmlControlsHtmlButton-client-click-hits-the-server-twice.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=a5562015-2ce5-4933-850b-5729279d4cb1</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=a5562015-2ce5-4933-850b-5729279d4cb1</feedburner:origLink></item>
    <item>
      <title>Patch For ASP.NET Vulnerability Available</title>
      <description>&lt;p align="justify"&gt;&lt;a title="Microsoft Corporation" href="http://www.microsoft.com/" target="_blank"&gt;Microsoft&lt;/a&gt; has published a &lt;a title="Microsoft Security Advisory (2416728) - Vulnerability in ASP.NET Could Allow Information Disclosure" href="http://www.microsoft.com/technet/security/advisory/2416728.mspx" target="_blank"&gt;Security Advisory (2416728)&lt;/a&gt; about a security vulnerability in &lt;a title="ASP.NET Developer Center" href="http://msdn.microsoft.com/asp.net/" target="_blank"&gt;ASP.NET&lt;/a&gt; on Saturday, September 18th. This vulnerability exists in all versions of &lt;strong&gt;ASP.NET&lt;/strong&gt; and was publically disclosed late Friday at a security conference.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a title="ScottGu&amp;#39;s Blog" href="http://weblogs.asp.net/scottgu/default.aspx" target="_blank"&gt;Scott Guthrie&lt;/a&gt; has provided information on workarounds (please see &lt;a title="Important: ASP.NET Security Vulnerability" href="http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx" target="_blank"&gt;Important: ASP.NET Security Vulnerability&lt;/a&gt; and &lt;a title="ASP.NET Security Vulnerability" href="http://weblogs.asp.net/scottgu/archive/2010/09/24/update-on-asp-net-vulnerability.aspx" target="_blank"&gt;ASP.NET Security Vulnerability&lt;/a&gt;) to prevent attackers from using this vulnerability against their &lt;strong&gt;ASP.NET&lt;/strong&gt; applications.&lt;/p&gt;  &lt;p align="justify"&gt;To help with &lt;strong&gt;Microsoft&lt;/strong&gt;’s response to the new padding oracle vulnerability, a new forum was also set up: &lt;a href="http://forums.asp.net/1233.aspx"&gt;Security Vulnerability&lt;/a&gt;.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Microsoft&lt;/strong&gt; has now &lt;a title="Microsoft Security Bulletin MS10-070 - Important" href="http://www.microsoft.com/technet/security/bulletin/ms10-070.mspx" target="_blank"&gt;announced&lt;/a&gt; the release of an out-of-band security update to address the &lt;strong&gt;ASP.NET Security Vulnerability&lt;/strong&gt;.&lt;/p&gt;  &lt;p align="justify"&gt;Applying the update addresses the &lt;strong&gt;ASP.NET Security Vulnerability&lt;/strong&gt;, and once the update is applied to your system &lt;a title="Important: ASP.NET Security Vulnerability" href="http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx" target="_blank"&gt;the workarounds&lt;/a&gt;&amp;#160;&lt;strong&gt;Scott&lt;/strong&gt; has previously blogged about will no longer be required. But, until the update has been installed, those workarounds must be used.&lt;/p&gt;  &lt;p align="justify"&gt;You can learn more about this security update release from this reading the &lt;a title="Out of Band Release to Address Microsoft Security Advisory 2416728" href="http://blogs.technet.com/b/msrc/archive/2010/09/27/out-of-band-release-to-address-microsoft-security-advisory-2416728.aspx" target="_blank"&gt;Microsoft Security Response Center Blog Post&lt;/a&gt; as well as the official &lt;a title="Microsoft Security Bulletin MS10-070 - Important" href="http://www.microsoft.com/technet/security/bulletin/ms10-sep.mspx" target="_blank"&gt;Advance Notification Bulletin&lt;/a&gt;.&lt;/p&gt;  &lt;p align="left"&gt;&lt;strong&gt;Important Links:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;&lt;a title="Important: ASP.NET Security Vulnerability" href="http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx" target="_blank"&gt;Important: ASP.NET Security Vulnerability&lt;/a&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;a title="ASP.NET Security Vulnerability" href="http://weblogs.asp.net/scottgu/archive/2010/09/24/update-on-asp-net-vulnerability.aspx" target="_blank"&gt;ASP.NET Security Vulnerability&lt;/a&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;&lt;a title="Out of Band Release to Address Microsoft Security Advisory 2416728" href="http://blogs.technet.com/b/msrc/archive/2010/09/27/out-of-band-release-to-address-microsoft-security-advisory-2416728.aspx" target="_blank"&gt;Out of Band Release to Address Microsoft Security Advisory 2416728&lt;/a&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;&lt;a title="Microsoft Security Bulletin MS10-070 - Important" href="http://www.microsoft.com/technet/security/bulletin/ms10-sep.mspx" target="_blank"&gt;Microsoft Security Bulletin MS10-070 – Important&lt;/a&gt;&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xIKqNZK_tETou1KgGxa5cD50c-w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xIKqNZK_tETou1KgGxa5cD50c-w/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/xIKqNZK_tETou1KgGxa5cD50c-w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xIKqNZK_tETou1KgGxa5cD50c-w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/QugLEly0arg" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/QugLEly0arg/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2010/09/28/Patch-For-ASPNET-Vulnerability-Available.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=2d586c83-86e5-4926-8209-c7d4eda11f04</guid>
      <pubDate>Tue, 28 Sep 2010 09:06:02 -1300</pubDate>
      <category>ASP.NET</category>
      <category>Security</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=2d586c83-86e5-4926-8209-c7d4eda11f04</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=2d586c83-86e5-4926-8209-c7d4eda11f04</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2010/09/28/Patch-For-ASPNET-Vulnerability-Available.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=2d586c83-86e5-4926-8209-c7d4eda11f04</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=2d586c83-86e5-4926-8209-c7d4eda11f04</feedburner:origLink></item>
    <item>
      <title>jQuery UI on the Microsoft CDN</title>
      <description>&lt;p&gt;Microsoft is now hosting jQuery UI on the &lt;a href="http://www.asp.net/ajaxlibrary/cdn.ashx"&gt;Microsoft Ajax CDN&lt;/a&gt; (uncompressed and compressed versions) as well as all the pre-built themes.&lt;/p&gt;  &lt;p&gt;Remember that CDN using is free and no registration is required.&lt;/p&gt;  &lt;p&gt;For more information check out &lt;a href="http://stephenwalther.com/blog/archive/2010/09/17/jquery-ui-on-the-microsoft-cdn.aspx"&gt;Stephen Walther’s announcement from Microsoft&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9rTrwau71VdeVXV6lt9Je9LiCJE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9rTrwau71VdeVXV6lt9Je9LiCJE/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/9rTrwau71VdeVXV6lt9Je9LiCJE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9rTrwau71VdeVXV6lt9Je9LiCJE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/O7BMhH6USMA" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/O7BMhH6USMA/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2010/09/18/jQuery-UI-on-the-Microsoft-CDN.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=78dd95f9-3135-498b-a7b4-41d0e8b90411</guid>
      <pubDate>Sat, 18 Sep 2010 21:26:06 -1300</pubDate>
      <category>ASP.NET</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=78dd95f9-3135-498b-a7b4-41d0e8b90411</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=78dd95f9-3135-498b-a7b4-41d0e8b90411</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2010/09/18/jQuery-UI-on-the-Microsoft-CDN.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=78dd95f9-3135-498b-a7b4-41d0e8b90411</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=78dd95f9-3135-498b-a7b4-41d0e8b90411</feedburner:origLink></item>
    <item>
      <title>2010 Microsoft® MVP Award</title>
      <description>&lt;p&gt;It’s now official and public. I was reward with the MVP award in ASP/ASP.NET.&lt;/p&gt;  &lt;p&gt;This award is a huge responsibility but is also a sign that shows the right way.&lt;/p&gt;  &lt;p&gt;During last year I learned many things and also made some mistakes. &lt;/p&gt;  &lt;p&gt;What can say about next year is that my guidelines won’t change: learn, help and share.&lt;/p&gt;  &lt;p&gt;Thanks everyone.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_uF-XXuxNory5LCQfxYzKpclfjc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_uF-XXuxNory5LCQfxYzKpclfjc/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/_uF-XXuxNory5LCQfxYzKpclfjc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_uF-XXuxNory5LCQfxYzKpclfjc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/RSM6vKj85uE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/RSM6vKj85uE/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2010/07/06/2010-Microsoftc2ae-MVP-Award.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=c8ab5b80-bda1-40da-b1d3-1fac799040c0</guid>
      <pubDate>Tue, 06 Jul 2010 09:46:05 -1300</pubDate>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=c8ab5b80-bda1-40da-b1d3-1fac799040c0</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=c8ab5b80-bda1-40da-b1d3-1fac799040c0</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2010/07/06/2010-Microsoftc2ae-MVP-Award.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=c8ab5b80-bda1-40da-b1d3-1fac799040c0</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=c8ab5b80-bda1-40da-b1d3-1fac799040c0</feedburner:origLink></item>
    <item>
      <title>ASP.NET Controls – CommunityServer Captcha ControlAdapter, a practical case</title>
      <description>&lt;p&gt;
The &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter(VS.80).aspx" target="_blank"&gt;ControlAdapter&lt;/a&gt; is available since .NET framework version 2.0 and his main goal is to adapt and customize a control render in order to achieve a specific behavior or layout. This customization is done without changing the base control.
&lt;/p&gt;
&lt;p&gt;
A &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter(VS.80).aspx" target="_blank"&gt;ControlAdapter&lt;/a&gt; is commonly used to custom render for specific platforms like Mobile.
&lt;/p&gt;
&lt;p&gt;
In this particular case the &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter(VS.80).aspx" target="_blank"&gt;ControlAdapter&lt;/a&gt; was used to add a specific behavior to a Control. In this&amp;nbsp; post I will use one adapter to add a &lt;a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank"&gt;Captcha&lt;/a&gt; to all &lt;span style="color: #2b91af"&gt;WeblogPostCommentForm &lt;/span&gt;controls within &lt;a href="http://pontonetpt.com" target="_blank"&gt;pontonetpt.com&lt;/a&gt;&amp;nbsp;&lt;a href="http://communityserver.com/" target="_blank"&gt;CommunityServer&lt;/a&gt; instance.
&lt;/p&gt;
&lt;h3&gt;The Challenge&lt;/h3&gt;
&lt;p&gt;
The &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter(VS.80).aspx" target="_blank"&gt;ControlAdapter&lt;/a&gt; complexity is usually associated with the complexity/structure of is base control. This case is precisely one of those since base control dynamically load his content (controls) thru several &lt;a href="http://msdn.microsoft.com/library/system.web.ui.itemplate.aspx" target="_blank"&gt;ITemplate&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Those of you who already played with &lt;a href="http://msdn.microsoft.com/library/system.web.ui.itemplate.aspx" target="_blank"&gt;ITemplate&lt;/a&gt; knows that while it is an excellent option for control composition it also brings to the table a big issue:
&lt;/p&gt;
&lt;blockquote&gt;
	&lt;p&gt;
	&amp;ldquo;Controls defined within a template are not available for manipulation until they are instantiated inside another control.&amp;rdquo;
	&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
While analyzing the &lt;span style="color: #2b91af"&gt;WeblogPostCommentForm&lt;/span&gt; control I found that he uses the &lt;a href="http://msdn.microsoft.com/library/system.web.ui.itemplate.aspx" target="_blank"&gt;ITemplate&lt;/a&gt; technique to compose it&amp;rsquo;s layout and unfortunately I also found that the template content vary from theme to theme. This could have been a problem but luckily &lt;span style="color: #2b91af"&gt;WeblogPostCommentForm&lt;/span&gt; control template content always contains a submit button with a well known ID (at least I can assume that there are a well known set of IDs).
&lt;/p&gt;
&lt;p&gt;
Using this submit button as anchor it&amp;rsquo;s possible to add the &lt;a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank"&gt;Captcha&lt;/a&gt; controls in the correct place.
&lt;/p&gt;
&lt;p&gt;
Another important finding was that &lt;span style="color: #2b91af"&gt;WeblogPostCommentForm &lt;/span&gt;control inherits from the &lt;font color="#0080ff"&gt;WrappedFormBase&lt;/font&gt; control which is the base control for all &lt;a href="http://communityserver.com/" target="_blank"&gt;CommunityServer&lt;/a&gt; input forms. 
&lt;/p&gt;
&lt;p&gt;
Knowing this inheritance link the main goal has changed to became the creation of a base &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter(VS.80).aspx" target="_blank"&gt;ControlAdapter&lt;/a&gt; that&amp;nbsp; could be extended and customized to allow adding &lt;a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank"&gt;Captcha&lt;/a&gt; to:
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;post comments form &lt;/li&gt;
	&lt;li&gt;contact form &lt;/li&gt;
	&lt;li&gt;user creation form. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
And, with this mind set, I decided to used the following &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter(VS.80).aspx" target="_blank"&gt;ControlAdapter&lt;/a&gt; base class signature :
&lt;/p&gt;
&lt;pre class="code"&gt;
&lt;span style="color: blue"&gt;public abstract class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;WrappedFormBaseCaptchaAdapter&lt;/span&gt;&amp;lt;T&amp;gt; : &lt;span style="color: #2b91af"&gt;ControlAdapter &lt;/span&gt;&lt;span style="color: blue"&gt;where &lt;/span&gt;T : &lt;span style="color: #2b91af"&gt;WrappedFormBase&lt;/span&gt;{}
&lt;/pre&gt;
Great, but there are still many to do &amp;hellip; 
&lt;h3&gt;Captcha&lt;/h3&gt;
&lt;p&gt;
The &lt;a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank"&gt;Captcha&lt;/a&gt; will be assembled with:
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A dynamically generated image with a set of random numbers &lt;/li&gt;
	&lt;li&gt;A &lt;a href="http://msdn.microsoft.com/library/system.windows.forms.textbox.aspx" target="_blank"&gt;TextBox&lt;/a&gt; control where the image number will be inserted &lt;/li&gt;
	&lt;li&gt;A &lt;a href="http://msdn.microsoft.com/library/system.web.ui.webcontrols.customvalidator.aspx" target="_blank"&gt;Validator&lt;/a&gt; control to validate whether &lt;a href="http://msdn.microsoft.com/library/system.windows.forms.textbox.aspx" target="_blank"&gt;TextBox&lt;/a&gt; numbers match the image numbers &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
This is a common &lt;a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank"&gt;Captcha&lt;/a&gt; implementation, is not rocket science and don&amp;rsquo;t bring any additional problem. The main problem, as told before, is to find the correct anchor control to ensure a correct &lt;a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank"&gt;Captcha&lt;/a&gt; control injection.
&lt;/p&gt;
&lt;p&gt;
The anchor control can vary by:
&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;target control&amp;nbsp; &lt;/li&gt;
	&lt;li&gt;theme &lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Implementation&lt;/h3&gt;
&lt;p&gt;
To support this dynamic scenario I choose to use the following implementation:
&lt;/p&gt;
&lt;pre class="code"&gt;
&lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; _validAnchorIds = &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;span style="color: blue"&gt;protected virtual &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; ValidAnchorIds{    &lt;span style="color: blue"&gt;get    &lt;/span&gt;{        &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;this&lt;/span&gt;._validAnchorIds == &lt;span style="color: blue"&gt;null&lt;/span&gt;)        {            &lt;span style="color: blue"&gt;this&lt;/span&gt;._validAnchorIds = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt;();            &lt;span style="color: blue"&gt;this&lt;/span&gt;._validAnchorIds.Add(&lt;span style="color: #a31515"&gt;&amp;quot;btnSubmit&amp;quot;&lt;/span&gt;);        }        &lt;span style="color: blue"&gt;return this&lt;/span&gt;._validAnchorIds;    }}&lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Control &lt;/span&gt;GetAnchorControl(T wrapper){    &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;this&lt;/span&gt;.ValidAnchorIds == &lt;span style="color: blue"&gt;null &lt;/span&gt;|| &lt;span style="color: blue"&gt;this&lt;/span&gt;.ValidAnchorIds.Count == 0)    {        &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ArgumentException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Cannot be null or empty&amp;quot;&lt;/span&gt;, &lt;span style="color: #a31515"&gt;&amp;quot;validAnchorNames&amp;quot;&lt;/span&gt;);    }    &lt;span style="color: blue"&gt;var &lt;/span&gt;q = &lt;span style="color: blue"&gt;from &lt;/span&gt;anchorId &lt;span style="color: blue"&gt;in this&lt;/span&gt;.ValidAnchorIds            &lt;span style="color: blue"&gt;let &lt;/span&gt;anchorControl = &lt;span style="color: #2b91af"&gt;CSControlUtility&lt;/span&gt;.Instance().FindControl(wrapper, anchorId)            &lt;span style="color: blue"&gt;where &lt;/span&gt;anchorControl != &lt;span style="color: blue"&gt;null            select &lt;/span&gt;anchorControl;    &lt;span style="color: blue"&gt;return &lt;/span&gt;q.FirstOrDefault();}
&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;
I can now, using the ValidAnchorIds property, configure a set of valid anchor control&amp;nbsp; Ids. 
&lt;/p&gt;
&lt;p&gt;
The GetAnchorControl method searches for a valid anchor control within the set of valid control Ids. Here, some of you may question why to use a &lt;a href="http://bit.ly/Livro-LINQ-Com-Charp" target="_blank"&gt;LINQ To Objects&lt;/a&gt; expression, but the important here is to notice the usage of &lt;span style="color: #2b91af"&gt;CSControlUtility&lt;/span&gt;.Instance().FindControl &lt;a href="http://communityserver.com/" target="_blank"&gt;CommunityServer&lt;/a&gt; method. I want to build on top of &lt;a href="http://communityserver.com/" target="_blank"&gt;CommunityServer&lt;/a&gt; not to reinvent the wheel.
&lt;/p&gt;
&lt;p&gt;
Assuming that an anchor control was found, it&amp;rsquo;s now possible to inject the &lt;a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank"&gt;Captcha&lt;/a&gt; at the correct place. This not something new, we do this all the time when creating server controls or adding dynamic controls:
&lt;/p&gt;
&lt;pre class="code"&gt;
&lt;span style="color: blue"&gt;protected sealed override void &lt;/span&gt;CreateChildControls(){    &lt;span style="color: blue"&gt;base&lt;/span&gt;.CreateChildControls();    &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;this&lt;/span&gt;.IsCaptchaRequired)    {        T wrapper = &lt;span style="color: blue"&gt;base&lt;/span&gt;.Control &lt;span style="color: blue"&gt;as &lt;/span&gt;T;        &lt;span style="color: blue"&gt;if &lt;/span&gt;(wrapper != &lt;span style="color: blue"&gt;null&lt;/span&gt;)        {            &lt;span style="color: #2b91af"&gt;Control &lt;/span&gt;anchorControl = GetAnchorControl(wrapper);            &lt;span style="color: blue"&gt;if &lt;/span&gt;(anchorControl != &lt;span style="color: blue"&gt;null&lt;/span&gt;)            {                &lt;span style="color: #2b91af"&gt;Panel &lt;/span&gt;phCaptcha = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Panel &lt;/span&gt;{CssClass = &lt;span style="color: #a31515"&gt;&amp;quot;CommonFormField&amp;quot;&lt;/span&gt;, ID = &lt;span style="color: #a31515"&gt;&amp;quot;Captcha&amp;quot;&lt;/span&gt;};                &lt;span style="color: blue"&gt;int &lt;/span&gt;index = anchorControl.Parent.Controls.IndexOf(anchorControl);                anchorControl.Parent.Controls.AddAt(index, phCaptcha);                &lt;span style="color: #2b91af"&gt;CaptchaConfiguration&lt;/span&gt;.DefaultProvider.AddCaptchaControls(                    phCaptcha,                    GetValidationGroup(wrapper, anchorControl));            }        }    }}
&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;
Here you can see a new entity in action: a provider. This is a &lt;span style="color: #2b91af"&gt;CaptchaProvider &lt;/span&gt;class instance and is only goal is to create the &lt;a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank"&gt;Captcha&lt;/a&gt; itself and do everything else is needed to ensure is correct operation.
&lt;/p&gt;
&lt;pre class="code"&gt;
&lt;span style="color: blue"&gt;public abstract class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CaptchaProvider &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;ProviderBase&lt;/span&gt;{    &lt;span style="color: blue"&gt;public abstract void &lt;/span&gt;AddCaptchaControls(&lt;span style="color: #2b91af"&gt;Panel &lt;/span&gt;captchaPanel, &lt;span style="color: blue"&gt;string &lt;/span&gt;validationGroup);}
&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;
You can create your own specific &lt;span style="color: #2b91af"&gt;CaptchaProvider &lt;/span&gt;class to use different &lt;a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank"&gt;Captcha&lt;/a&gt; strategies including the use of existing &lt;a href="http://en.wikipedia.org/wiki/CAPTCHA" target="_blank"&gt;Captcha&lt;/a&gt; services&amp;nbsp; like &lt;a href="http://recaptcha.net/" target="_blank"&gt;ReCaptcha&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Once the generic &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter(VS.80).aspx" target="_blank"&gt;ControlAdapter&lt;/a&gt; was created became extremely easy to created a specific one. Here is the specific &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter(VS.80).aspx" target="_blank"&gt;ControlAdapter&lt;/a&gt; for the &lt;span style="color: #2b91af"&gt;WeblogPostCommentForm &lt;font color="#000000"&gt;control:&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;pre class="code"&gt;
&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;WeblogPostCommentFormCaptchaAdapter &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;WrappedFormBaseCaptchaAdapter&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;WrappedFormBase&lt;/span&gt;&amp;gt;{    &lt;span style="color: blue"&gt;#region &lt;/span&gt;Overriden Methods    &lt;span style="color: blue"&gt;protected override &lt;/span&gt;&lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; ValidAnchorIds    {        &lt;span style="color: blue"&gt;get        &lt;/span&gt;{            &lt;span style="color: #2b91af"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue"&gt;string&lt;/span&gt;&amp;gt; validAnchorNames = &lt;span style="color: blue"&gt;base&lt;/span&gt;.ValidAnchorIds;            validAnchorNames.Add(&lt;span style="color: #a31515"&gt;&amp;quot;CommentSubmit&amp;quot;&lt;/span&gt;);            &lt;span style="color: blue"&gt;return &lt;/span&gt;validAnchorNames;        }    }    &lt;span style="color: blue"&gt;protected override string &lt;/span&gt;DefaultValidationGroup    {        &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;&amp;quot;CreateCommentForm&amp;quot;&lt;/span&gt;; }    }    &lt;span style="color: blue"&gt;#endregion &lt;/span&gt;Overriden Methods}
&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;h3&gt;Configuration&lt;/h3&gt;
&lt;p&gt;
This is the magic step. 
&lt;/p&gt;
&lt;p&gt;
Without changing the original pages and keeping the application original assemblies untouched we are going to add a new behavior to the &lt;a href="http://communityserver.com/" target="_blank"&gt;CommunityServer&lt;/a&gt; application.
&lt;/p&gt;
&lt;p&gt;
To glue everything together you must follow this steps:
&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Add the following configuration to &lt;a href="http://msdn.microsoft.com/en-us/library/ms228122.aspx" target="_blank"&gt;default.browser&lt;/a&gt; file:
	&lt;pre class="code"&gt;
	&lt;span style="color: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #a31515"&gt;xml &lt;/span&gt;&lt;span style="color: red"&gt;version&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;#39;&lt;span style="color: blue"&gt;1.0&lt;/span&gt;&amp;#39; &lt;span style="color: red"&gt;encoding&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;#39;&lt;span style="color: blue"&gt;utf-8&lt;/span&gt;&amp;#39;&lt;span style="color: blue"&gt;?&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;browsers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;browser &lt;/span&gt;&lt;span style="color: red"&gt;refID&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Default&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;controlAdapters&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;Adapter for the WeblogPostCommentForm control in order to add the Captcha and prevent SPAM comments &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;adapter &lt;/span&gt;&lt;span style="color: red"&gt;controlType&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;CommunityServer.Blogs.Controls.WeblogPostCommentForm&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;adapterType&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;NunoGomes.CommunityServer.Components.WeblogPostCommentFormCaptchaAdapter, NunoGomes.CommunityServer&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: blue"&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;controlAdapters&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;browser&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;browsers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;/pre&gt;
	&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Add the following configuration to web.config file:
	&lt;pre class="code"&gt;
	&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;configSections&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;    &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;New section for Captcha providers configuration &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;section &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;communityServer.Captcha&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;NunoGomes.CommunityServer.Captcha.Configuration.CaptchaSection&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;configSections&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;/pre&gt;
	&lt;pre class="code"&gt;
	  &lt;span style="color: blue"&gt;&amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;Configuring a simple Captcha provider &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;communityServer.Captcha &lt;/span&gt;&lt;span style="color: red"&gt;defaultProvider&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;simpleCaptcha&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;providers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;simpleCaptcha&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;NunoGomes.CommunityServer.Captcha.Providers.SimpleCaptchaProvider, NunoGomes.CommunityServer&lt;/span&gt;&amp;quot;            &lt;span style="color: red"&gt;imageUrl&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;~/captcha.ashx&lt;/span&gt;&amp;quot;            &lt;span style="color: red"&gt;enabled&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;true&lt;/span&gt;&amp;quot;            &lt;span style="color: red"&gt;passPhrase&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;_YourPassPhrase_&lt;/span&gt;&amp;quot;            &lt;span style="color: red"&gt;saltValue&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;_YourSaltValue_&lt;/span&gt;&amp;quot;            &lt;span style="color: red"&gt;hashAlgorithm&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;SHA1&lt;/span&gt;&amp;quot;            &lt;span style="color: red"&gt;passwordIterations&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;3&lt;/span&gt;&amp;quot;            &lt;span style="color: red"&gt;keySize&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;256&lt;/span&gt;&amp;quot;            &lt;span style="color: red"&gt;initVector&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;_YourInitVectorWithExactly_16_Bytes_&lt;/span&gt;&amp;quot;            &lt;span style="color: blue"&gt;/&amp;gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;providers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;communityServer.Captcha&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;/pre&gt;
	&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
	&lt;pre class="code"&gt;
	&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.web&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;httpHandlers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;      &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;The Captcha Image handler used by the simple Captcha provider &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;verb&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;GET&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;path&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;captcha.ashx&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;NunoGomes.CommunityServer.Captcha.Providers.SimpleCaptchaProviderImageHandler, NunoGomes.CommunityServer&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;httpHandlers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.web&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;  &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.webServer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;handlers &lt;/span&gt;&lt;span style="color: red"&gt;accessPolicy&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;Read, Write, Script, Execute&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;      &amp;lt;!-- &lt;/span&gt;&lt;span style="color: green"&gt;The Captcha Image handler used by the simple Captcha provider &lt;/span&gt;&lt;span style="color: blue"&gt;--&amp;gt;      &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;verb&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;GET&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;captcha&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;path&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;captcha.ashx&lt;/span&gt;&amp;quot; &lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;NunoGomes.CommunityServer.Captcha.Providers.SimpleCaptchaProviderImageHandler, NunoGomes.CommunityServer&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;handlers&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;  &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;system.webServer&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;configuration&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;
	&lt;/pre&gt;
	&lt;/li&gt;
&lt;/ol&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;
Building a &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter(VS.80).aspx" target="_blank"&gt;ControlAdapter&lt;/a&gt; can be complex but the reward is his ability to allows us, thru configuration changes, to modify an application render and/or behavior. 
&lt;/p&gt;
&lt;p&gt;
You can see this &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter(VS.80).aspx" target="_blank"&gt;ControlAdapter&lt;/a&gt; in action &lt;a href="http://pontonetpt.org/user/CreateUser.aspx?ReturnUrl=" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://msmvps.com/user/CreateUser.aspx?ReturnUrl=" target="_blank"&gt;here&lt;/a&gt; (anonymous required).
&lt;/p&gt;
&lt;p&gt;
A complete solution is available in &amp;ldquo;&lt;a href="http://ngcsextensions.codeplex.com/" target="_blank"&gt;&lt;strong&gt;&lt;font size="3"&gt;CommunityServer Extensions&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;&amp;rdquo; Codeplex project.
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-T19j23YElSZ8CxGewQkpP1f0L0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-T19j23YElSZ8CxGewQkpP1f0L0/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/-T19j23YElSZ8CxGewQkpP1f0L0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-T19j23YElSZ8CxGewQkpP1f0L0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/e8M6KAUBD6Q" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/e8M6KAUBD6Q/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2010/03/31/ASPNETControls_CommunityServer_Captcha_ControlAdapter.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=c5e014d5-401f-48be-aca1-1388523122d5</guid>
      <pubDate>Wed, 31 Mar 2010 18:10:00 -1300</pubDate>
      <category>ASP.NET</category>
      <category>CommunityServer</category>
      <category>CodeProject</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=c5e014d5-401f-48be-aca1-1388523122d5</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=c5e014d5-401f-48be-aca1-1388523122d5</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2010/03/31/ASPNETControls_CommunityServer_Captcha_ControlAdapter.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=c5e014d5-401f-48be-aca1-1388523122d5</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=c5e014d5-401f-48be-aca1-1388523122d5</feedburner:origLink></item>
    <item>
      <title>Tools – Free Typemock Isolator 2010 license</title>
      <description>&lt;p&gt;That’s true, &lt;a href="http://site.typemock.com/" target="_blank"&gt;Typemock&lt;/a&gt; is giving &lt;a href="http://site.typemock.com/typemock-isolator-product/" target="_blank"&gt;Isolator 2010&lt;/a&gt; free licenses. All you need to do is:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;have a Twitter account&lt;/li&gt;    &lt;li&gt;follow Typemock in Twitter: @Typemock &lt;/li&gt;    &lt;li&gt;twit from your personal twitter: just entered for a chance to win a free Isolator &lt;a href="http://www.twitter.com/Typemock"&gt;@typemock&lt;/a&gt; RT it to enter the double drawing. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Go ahead, last draw is tomorrow, 24/02, and it will be a double draw.&lt;/p&gt;  &lt;p&gt;Good luck …&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GbxljemidBh2qXzqvP0Q0XFNF_I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GbxljemidBh2qXzqvP0Q0XFNF_I/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/GbxljemidBh2qXzqvP0Q0XFNF_I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GbxljemidBh2qXzqvP0Q0XFNF_I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/2La2rtltvBU" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/2La2rtltvBU/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2010/02/22/Tools-e28093-Free-Typemock-Isolator-2010-license.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=c54ae26d-a492-4069-a33d-c91f99e44771</guid>
      <pubDate>Mon, 22 Feb 2010 22:43:30 -1300</pubDate>
      <category>Unit Tests</category>
      <category>Tools</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=c54ae26d-a492-4069-a33d-c91f99e44771</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=c54ae26d-a492-4069-a33d-c91f99e44771</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2010/02/22/Tools-e28093-Free-Typemock-Isolator-2010-license.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=c54ae26d-a492-4069-a33d-c91f99e44771</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=c54ae26d-a492-4069-a33d-c91f99e44771</feedburner:origLink></item>
    <item>
      <title>WinForms Controls – Displaying a vertical tab</title>
      <description>&lt;p&gt;It’s been several years since my last WinForms programming experience - I’m a ASP.NET maniac since 2002/2003 – but this year started with an unexpected challenge: build a &lt;a href="http://msdn.microsoft.com/vsx/default.aspx" target="_blank"&gt;Visual Studio&amp;#160; 2008 Integration Package&lt;/a&gt; (VSIP) with an advanced Editor for some in-house metadata xml structure.&lt;/p&gt;  &lt;p&gt;If you already did some work related to VSIP is no surprise that I was forced to embrace the long ago forgotten Winforms controls specificities.&lt;/p&gt;  &lt;p&gt;Maybe I simply forgot or never noticed before, but the &lt;a href="http://msdn.microsoft.com/en-us/library/4akwf92a(VS.80).aspx" target="_blank"&gt;TabControl&lt;/a&gt; when operating in &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.tabcontrol.alignment.aspx" target="_blank"&gt;vertical mode&lt;/a&gt; – either Left or Right – display an amazing poor user experience and in most cases text are not showed.&lt;/p&gt;  &lt;p&gt;Ok, no big deal, TabControl have enough extensibility points to enable us to work around and its even available a Msdn article with the recipe: &lt;a href="http://msdn.microsoft.com/en-us/library/ms404305.aspx#Mtps_DropDownFilterText" target="_blank"&gt;How to: Display Side-Aligned Tabs with TabControl&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Maybe it’s just me but this is the kind of behavior I did expect to be fully available and functional since it seams to be quite common in most applications.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QDUmUnjHB4lia7F4sOTYlu6-zXA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QDUmUnjHB4lia7F4sOTYlu6-zXA/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/QDUmUnjHB4lia7F4sOTYlu6-zXA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QDUmUnjHB4lia7F4sOTYlu6-zXA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/3bKFKXc0D0o" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/3bKFKXc0D0o/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2010/02/18/WinForms-Controls-e28093-Displaying-a-vertical-tabs.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=abab07d2-7dd1-4e45-89e2-4f3ac5db18ad</guid>
      <pubDate>Thu, 18 Feb 2010 20:06:58 -1300</pubDate>
      <category>WinForms</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=abab07d2-7dd1-4e45-89e2-4f3ac5db18ad</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=abab07d2-7dd1-4e45-89e2-4f3ac5db18ad</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2010/02/18/WinForms-Controls-e28093-Displaying-a-vertical-tabs.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=abab07d2-7dd1-4e45-89e2-4f3ac5db18ad</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=abab07d2-7dd1-4e45-89e2-4f3ac5db18ad</feedburner:origLink></item>
    <item>
      <title>Tools – RedGate just release the new .NET Reflector 6.0 and .NET Reflector Pro</title>
      <description>&lt;p&gt;The long waiting, for &lt;a href="http://www.red-gate.com" target="_blank"&gt;RedGate&lt;/a&gt; to release the &lt;a href="http://www.red-gate.com/products/reflector/index.htm" target="_blank"&gt;new official .NET Reflector version&lt;/a&gt;, is finally ended.&lt;/p&gt;  &lt;p&gt;I must say that as far as I know (and I was an early adopter and usability tester), &lt;a href="http://www.red-gate.com" target="_blank"&gt;RedGate&lt;/a&gt; took special care with this new version, specially the new Reflector Pro version.&lt;/p&gt;  &lt;p&gt;This new product (€145)&amp;#160; integrates the technology of .NET Reflector into Visual Studio to let you debug third-party code even if you don't have the source.&lt;/p&gt;  &lt;p&gt;You can say that this can also be done without this product, and it’s absolutely true, but the simplicity how the integration with Visual Studio (2005, 2008 or 2010) is done worth it .&lt;/p&gt;  &lt;p&gt;I use this tool since the beta versions and I’m addicted ;) … try it for yourself.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6vVMU8-3TKt_NqD5mwDW2PI4_DU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6vVMU8-3TKt_NqD5mwDW2PI4_DU/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/6vVMU8-3TKt_NqD5mwDW2PI4_DU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6vVMU8-3TKt_NqD5mwDW2PI4_DU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/kJge24_4pkM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/kJge24_4pkM/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2010/02/14/Tools-e28093-RedGate-just-release-the-new-NET-Reflector-60-and-NET-Reflector-Pro.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=e5ca043b-69d4-4783-b8ce-388ec1d685b6</guid>
      <pubDate>Sun, 14 Feb 2010 20:50:04 -1300</pubDate>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=e5ca043b-69d4-4783-b8ce-388ec1d685b6</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=e5ca043b-69d4-4783-b8ce-388ec1d685b6</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2010/02/14/Tools-e28093-RedGate-just-release-the-new-NET-Reflector-60-and-NET-Reflector-Pro.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=e5ca043b-69d4-4783-b8ce-388ec1d685b6</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=e5ca043b-69d4-4783-b8ce-388ec1d685b6</feedburner:origLink></item>
    <item>
      <title>ASP.NET Controls – Problem sorting GridView with SqlDataSource control</title>
      <description>&lt;p&gt;
Let me start by saying that Microsoft don&amp;#39;t consider this issue as a problem, as you can see &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=102618" target="_blank"&gt;here&lt;/a&gt; this is a &amp;ldquo;by design&amp;rdquo; behavior.
&lt;/p&gt;
&lt;p&gt;
The problem is well described in the referred Connect feedback and it contains a workaround.
&lt;/p&gt;
&lt;p&gt;
Although simple, the workaround requires you to always register the &lt;a href="http://msdn.microsoft.com/library/system.web.ui.webcontrols.gridview.aspx" target="_blank"&gt;GridView&lt;/a&gt; &lt;a href="http://msdn.microsoft.com/library/system.web.ui.webcontrols.gridview.sorting.aspx" target="_blank"&gt;Sorting event&lt;/a&gt; and make the tweak according to the current GridView settings. Well, if are like me you will forget to do it half the times needed.
&lt;/p&gt;
&lt;p&gt;
So, I made a not so simple workaround that will take care of the issue for me.
&lt;/p&gt;
&lt;p&gt;
I override the &lt;a href="http://msdn.microsoft.com/library/system.web.ui.webcontrols.gridview.onsorting.aspx" target="_blank"&gt;OnSorting&lt;/a&gt; method from GridView so I can handle the &lt;a href="http://msdn.microsoft.com/library/system.web.ui.webcontrols.gridviewsorteventargs.aspx" target="_blank"&gt;GridViewEventArgs&lt;/a&gt; instance and override its &lt;a href="http://msdn.microsoft.com/library/system.web.ui.webcontrols.gridviewsorteventargs.sortdirection.aspx" target="_blank"&gt;SortDirection&lt;/a&gt; value.
&lt;/p&gt;
&lt;p&gt;
To turn this into a general solution I partially reproduce the ParseSortString method from &lt;a href="http://msdn.microsoft.com/library/system.data.datatable.aspx" target="_blank"&gt;DataTable&lt;/a&gt; to find out if the current &lt;a href="http://msdn.microsoft.com/library/system.web.ui.webcontrols.gridview.sortexpression.aspx" target="_blank"&gt;SortExpression&lt;/a&gt; contains either the ASC or DESC keywords.
&lt;/p&gt;
&lt;p&gt;
Here is the code:
&lt;/p&gt;
&lt;pre class="code"&gt;
&lt;span style="color: blue"&gt;public class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;GridView &lt;/span&gt;: &lt;span style="color: blue"&gt;global&lt;/span&gt;::System.Web.UI.WebControls.&lt;span style="color: #2b91af"&gt;GridView&lt;/span&gt;{    &lt;span style="color: blue"&gt;protected override void &lt;/span&gt;OnSorting(&lt;span style="color: #2b91af"&gt;GridViewSortEventArgs &lt;/span&gt;e)    {        &lt;span style="color: blue"&gt;if &lt;/span&gt;(!&lt;span style="color: blue"&gt;string&lt;/span&gt;.IsNullOrEmpty(&lt;span style="color: blue"&gt;this&lt;/span&gt;.SortExpression))        {            &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: blue"&gt;this&lt;/span&gt;.SortExpression.Equals(&lt;span style="color: blue"&gt;this&lt;/span&gt;.SortExpression))            {                &lt;span style="color: blue"&gt;bool &lt;/span&gt;isMultipleSortExpression;                &lt;span style="color: #2b91af"&gt;SortDirection&lt;/span&gt;? sortDirection = GetSortDirection(&lt;span style="color: blue"&gt;this&lt;/span&gt;.SortExpression, &lt;span style="color: blue"&gt;out &lt;/span&gt;isMultipleSortExpression);                &lt;span style="color: blue"&gt;if &lt;/span&gt;(sortDirection.HasValue)                {                    &lt;span style="color: green"&gt;// To undo bug in GridView.HandleSort(string sortExpression) and then in GridView.CreateDataSourceSelectArguments()                    &lt;/span&gt;e.SortDirection = &lt;span style="color: #2b91af"&gt;SortDirection&lt;/span&gt;.Ascending;                }            }        }        &lt;span style="color: blue"&gt;base&lt;/span&gt;.OnSorting(e);    }    &lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SortDirection&lt;/span&gt;? GetSortDirection(&lt;span style="color: blue"&gt;string &lt;/span&gt;sortExpression, &lt;span style="color: blue"&gt;out bool &lt;/span&gt;isMultipleSortExpression)    {        &lt;span style="color: #2b91af"&gt;SortDirection&lt;/span&gt;? sortDirection = &lt;span style="color: blue"&gt;null&lt;/span&gt;;        isMultipleSortExpression = &lt;span style="color: blue"&gt;false&lt;/span&gt;;        &lt;span style="color: blue"&gt;string&lt;/span&gt;[] strArray = sortExpression.Split(&lt;span style="color: blue"&gt;new char&lt;/span&gt;[] { &lt;span style="color: #a31515"&gt;&amp;#39;,&amp;#39; &lt;/span&gt;});        &lt;span style="color: blue"&gt;for &lt;/span&gt;(&lt;span style="color: blue"&gt;int &lt;/span&gt;i = 0; i &amp;lt; strArray.Length; i++)        {            &lt;span style="color: blue"&gt;string &lt;/span&gt;strA = strArray[i].Trim();            &lt;span style="color: blue"&gt;int &lt;/span&gt;length = strA.Length;            &lt;span style="color: blue"&gt;if &lt;/span&gt;((length &amp;gt;= 5) &amp;amp;&amp;amp; (&lt;span style="color: blue"&gt;string&lt;/span&gt;.Compare(strA, length - 4, &lt;span style="color: #a31515"&gt;&amp;quot; ASC&amp;quot;&lt;/span&gt;, 0, 4, &lt;span style="color: #2b91af"&gt;StringComparison&lt;/span&gt;.OrdinalIgnoreCase) == 0))            {                sortDirection = &lt;span style="color: #2b91af"&gt;SortDirection&lt;/span&gt;.Ascending;            }            &lt;span style="color: blue"&gt;else if &lt;/span&gt;((length &amp;gt;= 6) &amp;amp;&amp;amp; (&lt;span style="color: blue"&gt;string&lt;/span&gt;.Compare(strA, length - 5, &lt;span style="color: #a31515"&gt;&amp;quot; DESC&amp;quot;&lt;/span&gt;, 0, 5, &lt;span style="color: #2b91af"&gt;StringComparison&lt;/span&gt;.OrdinalIgnoreCase) == 0))            {                sortDirection = &lt;span style="color: #2b91af"&gt;SortDirection&lt;/span&gt;.Descending;            }            &lt;span style="color: blue"&gt;if &lt;/span&gt;(!sortDirection.HasValue)            {                &lt;span style="color: blue"&gt;break&lt;/span&gt;;            }        }        &lt;span style="color: blue"&gt;if &lt;/span&gt;(sortDirection.HasValue)        {            &lt;span style="color: blue"&gt;if &lt;/span&gt;(strArray.Length &amp;gt; 1)            {                isMultipleSortExpression = &lt;span style="color: blue"&gt;true&lt;/span&gt;;            }        }        &lt;span style="color: blue"&gt;return &lt;/span&gt;sortDirection;    }}
&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;
Enjoy it.
&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lMSyq1eNOryzzAbsw6I29EeXY6U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lMSyq1eNOryzzAbsw6I29EeXY6U/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/lMSyq1eNOryzzAbsw6I29EeXY6U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lMSyq1eNOryzzAbsw6I29EeXY6U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/Qh29jv6MCuc" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/Qh29jv6MCuc/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2009/10/09/ASPNET-Controls-e28093-Problem-sorting-GridView-with-SqlDataSource-control.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=1f976684-583e-400a-9944-1241da58b02b</guid>
      <pubDate>Fri, 09 Oct 2009 03:47:00 -1300</pubDate>
      <category>ASP.NET</category>
      <category>CodeProject</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=1f976684-583e-400a-9944-1241da58b02b</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=1f976684-583e-400a-9944-1241da58b02b</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2009/10/09/ASPNET-Controls-e28093-Problem-sorting-GridView-with-SqlDataSource-control.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=1f976684-583e-400a-9944-1241da58b02b</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=1f976684-583e-400a-9944-1241da58b02b</feedburner:origLink></item>
    <item>
      <title>Remix 09 – THE NEXT WEB NOW</title>
      <description>&lt;p&gt;&lt;a href="http://www.microsoft.com/portugal/remix/index.aspx"&gt;&lt;img title="remix09" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin-left: 0px; margin-right: 0px; border-right-width: 0px" height="303" alt="remix09" src="http://blog.nunogomes.net/image.axd?picture=WindowsLiveWriter/Remix09_C7E/remix09_3.png" width="240" align="left" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Next October, 2 &lt;a href="http://www.microsoft.com/portugal/remix/" target="_blank"&gt;ReMIX&lt;/a&gt; 09 will be in Portugal.&lt;/p&gt;  &lt;p&gt;I’ll be there.&lt;/p&gt;  &lt;p&gt;If you are nearby, take the chance and came visit us.&lt;/p&gt;  &lt;p&gt;Hope to see you there.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DtXCYvPJDMFHhe-VcdHMhzonrj0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DtXCYvPJDMFHhe-VcdHMhzonrj0/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/DtXCYvPJDMFHhe-VcdHMhzonrj0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DtXCYvPJDMFHhe-VcdHMhzonrj0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/hIRwd4IdTFE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/hIRwd4IdTFE/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2009/09/21/Remix-09-e28093-THE-NEXT-WEB-NOW.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=d64bed69-99f2-4357-a3f1-55eb353bc57b</guid>
      <pubDate>Mon, 21 Sep 2009 07:51:36 -1300</pubDate>
      <category>Events</category>
      <category>ReMIX</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=d64bed69-99f2-4357-a3f1-55eb353bc57b</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=d64bed69-99f2-4357-a3f1-55eb353bc57b</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2009/09/21/Remix-09-e28093-THE-NEXT-WEB-NOW.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=d64bed69-99f2-4357-a3f1-55eb353bc57b</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=d64bed69-99f2-4357-a3f1-55eb353bc57b</feedburner:origLink></item>
    <item>
      <title>Typemock Racer – A “must have tool” for all ASP.NET developers</title>
      <description>&lt;p&gt;A very common mistake taken by junior ASP.NET developers is forgetting that any web application running in a IIS instance will most likely run in a multithread environment.&lt;/p&gt;  &lt;p&gt;They forgot that, unlike the dev environment which usually runs in a single thread pool, production environment usually have a working thread pool with several dozen threads.&lt;/p&gt;  &lt;p&gt;Common mechanism like the ASP.NET Cache or the ASP.NET Session have points of concurrency.&lt;/p&gt;  &lt;p&gt;It’s common to create singletons in web apps. The most common scenario are provider pattern implementations. Many times, apps also need to have it’s own Cache mechanism or even Session mechanism. All this scenarios may leads us to multi thread racing for some resources.&lt;/p&gt;  &lt;p&gt;Testing those code pieces were almost impossible … and multithread bugs and deadlocks were detected late in the application developing cycle:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;when running load tests &lt;/li&gt;    &lt;li&gt;or, in the worst scenario, only in a production environment. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Those days are gone … last May &lt;a href="http://www.typemock.com" target="_blank"&gt;Typemock&lt;/a&gt; added a new tool to its toolkit, the &lt;a href="http://www.typemock.com/learn_about_typemock_racer.php" target="_blank"&gt;Typemock Racer&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This new tool is intended to help finding and fixing possible deadlocks by enabling us to write threaded tests.&lt;/p&gt;  &lt;p&gt;And if you think that this is a complex task to do, you are wrong. Doing race tests is as simple as writing a unit test and then decorate it with an&amp;#160; attribute – [ParallelInspection].&lt;/p&gt;  &lt;p&gt;That’s it .. you can then run the test and Racer will try to find and recreate deadlocks.&lt;/p&gt;  &lt;p&gt;In future Racer will also check for race conditions.&lt;/p&gt;  &lt;p&gt;Take a look at this &lt;a href="http://weblogs.asp.net/rosherove/archive/2009/05/19/introducing-typemock-racer-1-0-find-multithreaded-deadlocks.aspx" target="_blank"&gt;Roy Osherove post&lt;/a&gt; for some snapshots and a little movie.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oC6em1amd1ZKxBvFzbntJ_3SrMk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oC6em1amd1ZKxBvFzbntJ_3SrMk/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/oC6em1amd1ZKxBvFzbntJ_3SrMk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oC6em1amd1ZKxBvFzbntJ_3SrMk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/o7SYwrL-P6U" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/o7SYwrL-P6U/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2009/07/15/Typemock_Racer_for_-ASPNET_developers.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=50248664-7c0b-42d7-9db8-8452a8afa157</guid>
      <pubDate>Wed, 15 Jul 2009 02:51:03 -1300</pubDate>
      <category>ASP.NET</category>
      <category>Tools</category>
      <category>Unit Tests</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=50248664-7c0b-42d7-9db8-8452a8afa157</pingback:target>
      <slash:comments>6</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=50248664-7c0b-42d7-9db8-8452a8afa157</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2009/07/15/Typemock_Racer_for_-ASPNET_developers.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=50248664-7c0b-42d7-9db8-8452a8afa157</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=50248664-7c0b-42d7-9db8-8452a8afa157</feedburner:origLink></item>
    <item>
      <title>NunoGomesControlToolkit – Now as a CodePlex project</title>
      <description>&lt;p&gt;This toolkit is intended to improve web apps performance by decreasing total page size. This page size reduction is achieved by decreasing control ClientID size.&lt;/p&gt;  &lt;p&gt;It’s been a year since I first made the code available at &lt;a title="NunoGomesControlToolkit" href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=NunoGomes&amp;amp;ReleaseId=1240" target="_blank"&gt;code.msdn.microsoft.com&lt;/a&gt; and now I decided to migrate it&amp;#160; to &lt;a href="http://aspnetshortids.codeplex.com/" target="_blank"&gt;CodePlex&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Try it !!!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZuOGOLR0giR2jljkNAUHfj_8LkI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZuOGOLR0giR2jljkNAUHfj_8LkI/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/ZuOGOLR0giR2jljkNAUHfj_8LkI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZuOGOLR0giR2jljkNAUHfj_8LkI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/RYQW02R4JpE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/RYQW02R4JpE/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2009/07/02/NunoGomesControlToolkit-e28093-Now-as-a-CodePlex-project.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=87542e03-609b-4c41-a197-ca11b3369073</guid>
      <pubDate>Thu, 02 Jul 2009 22:26:08 -1300</pubDate>
      <category>ASP.NET</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=87542e03-609b-4c41-a197-ca11b3369073</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=87542e03-609b-4c41-a197-ca11b3369073</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2009/07/02/NunoGomesControlToolkit-e28093-Now-as-a-CodePlex-project.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=87542e03-609b-4c41-a197-ca11b3369073</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=87542e03-609b-4c41-a197-ca11b3369073</feedburner:origLink></item>
    <item>
      <title>Typemock Isolator - Faking an internal static type and overriding a static method</title>
      <description>&lt;p&gt;In most common samples about faking static types, the type itself is public as the static methods are too.&lt;/p&gt;  &lt;p&gt;Usually programmers tend to expose all members that going to be targeted by an Unit test. Well, that’s not how I see Unit tests.&lt;/p&gt;  &lt;p&gt;I always try to produce code to keep the &lt;a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity" target="_blank"&gt;cyclomatic complexity&lt;/a&gt; lower, and If I succeeded I ended up with types that can be easily tested.&lt;/p&gt;  &lt;p&gt;I won’t expose code simply to test it, code should always have the minimum visibility that it indeed requires.&lt;/p&gt;  &lt;p&gt;Then I rely on tools to test all my type members, either private, internal or public.&lt;/p&gt;  &lt;p&gt;Currently I use the &lt;a href="http://www.typemock.com/Typemock_software_development_tools.php" target="_blank"&gt;Typemock Isolator&lt;/a&gt; and I must say that I’m completely satisfied.&lt;/p&gt;  &lt;p&gt;So, here’s how I faked an internal static type and also override it’s GetString method to allow me test the first parameter value:&lt;/p&gt;  &lt;pre class="code" style="height: 80px"&gt;&lt;span style="color: #2b91af"&gt;Type &lt;/span&gt;globalizationHelperType = &lt;span style="color: #2b91af"&gt;Type&lt;/span&gt;.GetType(&lt;span style="color: #a31515"&gt;&amp;quot;NG.Helper, NG&amp;quot;&lt;/span&gt;, &lt;span style="color: blue"&gt;true&lt;/span&gt;);
&lt;span style="color: #2b91af"&gt;Isolate&lt;/span&gt;.Fake.StaticMethods(globalizationHelperType);
&lt;span style="color: #2b91af"&gt;Isolate&lt;/span&gt;.WhenCalled(() =&amp;gt; globalizationHelperType.GetMethod(&lt;span style="color: #a31515"&gt;&amp;quot;GetString&amp;quot;&lt;/span&gt;, &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Type&lt;/span&gt;[] { &lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;String&lt;/span&gt;) }).Invoke(&lt;span style="color: blue"&gt;null&lt;/span&gt;, &lt;span style="color: blue"&gt;new object&lt;/span&gt;[] { &lt;span style="color: blue"&gt;null &lt;/span&gt;})).DoInstead((callcontext) =&amp;gt; { &lt;span style="color: blue"&gt;return &lt;/span&gt;callcontext.Parameters[0]; });&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7HLm9j1QhfdOHahCyFUfgHepUXA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7HLm9j1QhfdOHahCyFUfgHepUXA/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/7HLm9j1QhfdOHahCyFUfgHepUXA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7HLm9j1QhfdOHahCyFUfgHepUXA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/NunoGomes/~4/y4se58Vzu3M" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/NunoGomes/~3/y4se58Vzu3M/post.aspx</link>
      <author>nmgomes</author>
      <comments>http://blog.nunogomes.net/post/2009/07/02/Typemock-Isolator-Faking-an-internal-static-type-and-overriding-a-static-method.aspx#comment</comments>
      <guid isPermaLink="false">http://blog.nunogomes.net/post.aspx?id=984ebee1-4e8d-4384-87ba-39188adb7ef9</guid>
      <pubDate>Thu, 02 Jul 2009 07:40:12 -1300</pubDate>
      <category>Tools</category>
      <category>Unit Tests</category>
      <dc:publisher>nmgomes</dc:publisher>
      <pingback:server>http://blog.nunogomes.net/pingback.axd</pingback:server>
      <pingback:target>http://blog.nunogomes.net/post.aspx?id=984ebee1-4e8d-4384-87ba-39188adb7ef9</pingback:target>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://blog.nunogomes.net/trackback.axd?id=984ebee1-4e8d-4384-87ba-39188adb7ef9</trackback:ping>
      <wfw:comment>http://blog.nunogomes.net/post/2009/07/02/Typemock-Isolator-Faking-an-internal-static-type-and-overriding-a-static-method.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blog.nunogomes.net/syndication.axd?post=984ebee1-4e8d-4384-87ba-39188adb7ef9</wfw:commentRss>
    <feedburner:origLink>http://blog.nunogomes.net/post.aspx?id=984ebee1-4e8d-4384-87ba-39188adb7ef9</feedburner:origLink></item>
  </channel>
</rss>

