<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/" 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>Dan's Archive</title>
        <link>http://blogs.ipona.com/dan/Default.aspx</link>
        <description>Write. Edit. Leave. Reread. Edit. Delete. Repeat.</description>
        <language>en-GB</language>
        <copyright>Dan Maharry</copyright>
        <managingEditor>danm@hmobius.com</managingEditor>
        <generator>Subtext Version 2.0.0.43</generator>
        <image>
            <title>Dan's Archive</title>
            <url>http://blogs.ipona.com/images/RSS2Image.gif</url>
            <link>http://blogs.ipona.com/dan/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <geo:lat>51.9797</geo:lat><geo:long>-1.3276</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/DansArchive" type="application/rss+xml" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><item><title>Links for 2008-10-07 [del.icio.us]</title><link>http://feeds.feedburner.com/~r/DansArchive/~3/414485757/hmobius</link><pubDate>Wed, 08 Oct 2008 00:00:00 -0500</pubDate><guid isPermaLink="false">http://del.icio.us/hmobius#2008-10-07</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://blogs.msdn.com/webdevtools/archive/2008/10/05/exclude-files-and-folders-from-wdp-output.aspx">Exclude Files and Folders from WDP Output</a><br/>
Quick tutorial on using the MSBuild file that is a web deployment project to exclude or remove directories from a website&#039;s output directory once VS has been asked to build it.</li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/webdevtools/archive/2008/10/05/exclude-files-and-folders-from-wdp-output.aspx"&gt;Exclude Files and Folders from WDP Output&lt;/a&gt;&lt;br/&gt;
Quick tutorial on using the MSBuild file that is a web deployment project to exclude or remove directories from a website&amp;#039;s output directory once VS has been asked to build it.&lt;/li&gt;
&lt;/ul&gt;</description><feedburner:origLink>http://del.icio.us/hmobius#2008-10-07</feedburner:origLink></item><item><title>Links for 2008-09-30 [del.icio.us]</title><link>http://feeds.feedburner.com/~r/DansArchive/~3/407919630/hmobius</link><pubDate>Wed, 01 Oct 2008 00:00:00 -0500</pubDate><guid isPermaLink="false">http://del.icio.us/hmobius#2008-09-30</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://daptivate.com/archive/2008/08/28/subversion-best-practices-for-web-applications.aspx">Subversion Best Practices for Web Applications</a><br/>
Kyle Beyer&#039;s best practices for organising web applications in source control</li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://daptivate.com/archive/2008/08/28/subversion-best-practices-for-web-applications.aspx"&gt;Subversion Best Practices for Web Applications&lt;/a&gt;&lt;br/&gt;
Kyle Beyer&amp;#039;s best practices for organising web applications in source control&lt;/li&gt;
&lt;/ul&gt;</description><feedburner:origLink>http://del.icio.us/hmobius#2008-09-30</feedburner:origLink></item><item><title>Links for 2008-09-21 [del.icio.us]</title><link>http://feeds.feedburner.com/~r/DansArchive/~3/399480160/hmobius</link><pubDate>Mon, 22 Sep 2008 00:00:00 -0500</pubDate><guid isPermaLink="false">http://del.icio.us/hmobius#2008-09-21</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://underground-history.co.uk/front.php">Disused Stations on London's Underground</a><br/>
Site dedicated to the stations and closed off bits of the London Tube</li>
<li><a href="http://www.subbrit.org.uk/">Subterranea Britannica</a><br/>
Site dedicated to structures buried under the UK&#039;s surface. Bunkers, train stations etc</li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://underground-history.co.uk/front.php"&gt;Disused Stations on London's Underground&lt;/a&gt;&lt;br/&gt;
Site dedicated to the stations and closed off bits of the London Tube&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.subbrit.org.uk/"&gt;Subterranea Britannica&lt;/a&gt;&lt;br/&gt;
Site dedicated to structures buried under the UK&amp;#039;s surface. Bunkers, train stations etc&lt;/li&gt;
&lt;/ul&gt;</description><feedburner:origLink>http://del.icio.us/hmobius#2008-09-21</feedburner:origLink></item><item><title>Links for 2008-09-10 [del.icio.us]</title><link>http://feeds.feedburner.com/~r/DansArchive/~3/389334343/hmobius</link><pubDate>Thu, 11 Sep 2008 00:00:00 -0500</pubDate><guid isPermaLink="false">http://del.icio.us/hmobius#2008-09-10</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://aspadvice.com/blogs/ssmith/archive/2008/05/14/Black-Belt-ASP.NET-Performance-Techniques.aspx">Black Belt ASP.NET Performance Techniques</a><br/>
Presentation from Steve Smith on boosting website performance</li>
<li><a href="http://daptivate.com/archive/2008/02/12/top-10-best-practices-for-production-asp-net-applications.aspx">Top 10 Best Practices for Production ASP.NET Applications</a><br/>
Ten quick tips for deploying ASP.NET sites to a live environment</li>
<li><a href="http://feeds.feedburner.com/~r/CodeBetter/~3/294536564/10-things-to-consider-before-writing-a-book.aspx">10 Things to Consider Before Writing a Book</a><br/>
John Papa&#039;s notes on writing from his experiences with his latest book on Silverlight</li>
<li><a href="http://freelanceswitch.com/finding/the-monster-list-of-freelancing-job-sites/">The Monster List of Freelancing Job Sites</a></li>
<li><a href="http://blogs.msdn.com/tom/archive/2008/09/10/how-do-you-test-the-performance-of-your-web-site.aspx">How do you test the performance of your web site?</a><br/>
Spirited discussion on favoured tools used to test web site performance</li>
<li><a href="http://weblogs.asp.net/stephenwalther/archive/tags/Application+Building/default.aspx">Stephen Walther on ASP.NET MVC</a><br/>
Stephen Walther attempts to build the &#039;perfect&#039; forums site using the ASP.NET MVC framework. One to read in tandem with Rob Conery&#039;s MVC Storefront series</li>
<li><a href="http://msdn.microsoft.com/en-us/fsharp/default.aspx">Microsoft F# Developer Center</a></li>
<li><a href="http://blog.andreloker.de/?tag=/strings">Getting rid of Strings...</a><br/>
Andre Loker&#039;s series on the potential problems that arise from the use of string literals in source code. 
The various articles show different solutions on how to replace string literals with smarter constructs.</li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://aspadvice.com/blogs/ssmith/archive/2008/05/14/Black-Belt-ASP.NET-Performance-Techniques.aspx"&gt;Black Belt ASP.NET Performance Techniques&lt;/a&gt;&lt;br/&gt;
Presentation from Steve Smith on boosting website performance&lt;/li&gt;
&lt;li&gt;&lt;a href="http://daptivate.com/archive/2008/02/12/top-10-best-practices-for-production-asp-net-applications.aspx"&gt;Top 10 Best Practices for Production ASP.NET Applications&lt;/a&gt;&lt;br/&gt;
Ten quick tips for deploying ASP.NET sites to a live environment&lt;/li&gt;
&lt;li&gt;&lt;a href="http://feeds.feedburner.com/~r/CodeBetter/~3/294536564/10-things-to-consider-before-writing-a-book.aspx"&gt;10 Things to Consider Before Writing a Book&lt;/a&gt;&lt;br/&gt;
John Papa&amp;#039;s notes on writing from his experiences with his latest book on Silverlight&lt;/li&gt;
&lt;li&gt;&lt;a href="http://freelanceswitch.com/finding/the-monster-list-of-freelancing-job-sites/"&gt;The Monster List of Freelancing Job Sites&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/tom/archive/2008/09/10/how-do-you-test-the-performance-of-your-web-site.aspx"&gt;How do you test the performance of your web site?&lt;/a&gt;&lt;br/&gt;
Spirited discussion on favoured tools used to test web site performance&lt;/li&gt;
&lt;li&gt;&lt;a href="http://weblogs.asp.net/stephenwalther/archive/tags/Application+Building/default.aspx"&gt;Stephen Walther on ASP.NET MVC&lt;/a&gt;&lt;br/&gt;
Stephen Walther attempts to build the &amp;#039;perfect&amp;#039; forums site using the ASP.NET MVC framework. One to read in tandem with Rob Conery&amp;#039;s MVC Storefront series&lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/fsharp/default.aspx"&gt;Microsoft F# Developer Center&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.andreloker.de/?tag=/strings"&gt;Getting rid of Strings...&lt;/a&gt;&lt;br/&gt;
Andre Loker&amp;#039;s series on the potential problems that arise from the use of string literals in source code. 
The various articles show different solutions on how to replace string literals with smarter constructs.&lt;/li&gt;
&lt;/ul&gt;</description><feedburner:origLink>http://del.icio.us/hmobius#2008-09-10</feedburner:origLink></item><item><title>Links for 2008-09-06 [del.icio.us]</title><link>http://feeds.feedburner.com/~r/DansArchive/~3/385539651/hmobius</link><pubDate>Sun, 07 Sep 2008 00:00:00 -0500</pubDate><guid isPermaLink="false">http://del.icio.us/hmobius#2008-09-06</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://msdn.microsoft.com/en-gb/magazine/cc793966.aspx">Unhandled Exception Processing In The CLR</a><br/>
MSDN Magazine article on what happens as an unhandled exception is processed</li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-gb/magazine/cc793966.aspx"&gt;Unhandled Exception Processing In The CLR&lt;/a&gt;&lt;br/&gt;
MSDN Magazine article on what happens as an unhandled exception is processed&lt;/li&gt;
&lt;/ul&gt;</description><feedburner:origLink>http://del.icio.us/hmobius#2008-09-06</feedburner:origLink></item><item>
            <title>Expressing the Meme</title>
            <category>Fun</category>
            <link>http://feeds.feedburner.com/~r/DansArchive/~3/385206732/expressing-the-meme.aspx</link>
            <description>&lt;p&gt;&lt;a title="Chris Hart" href="http://blogs.ipona.com/chris" target="_blank" rel="friend met co-worker"&gt;Chris Hart&lt;/a&gt; has tagged me, so here are six random facts about me which are moderately interesting.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;I have, at various points, been referred to as 'Bamber', 'The Milky Bar Kid' and 'Beep', mostly in a friendly way. Sometimes not.&lt;/li&gt; &lt;li&gt;The worst holiday I ever had was in Nice (sic). I intend one day to return and prove this was a fluke.&lt;/li&gt; &lt;li&gt;I was, at one point, going to quit tech and become a session guitar player. It's still tempting&lt;/li&gt; &lt;li&gt;For ten years, I helped out at the National Student Drama Festival. I still miss it.&lt;/li&gt; &lt;li&gt;The first girl who ever kissed me was called Ruth. The first girl I wanted to kiss was called Angelique&lt;/li&gt; &lt;li&gt;Of the schools and universities I attended, only one still exists as it was when I was there. And it ain't the university.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;And, to perpetuate the meme, I tag &lt;a title="Emma's blog" href="http://editorialgirl.blogspot.com/" target="_blank" rel="nofollow"&gt;Emma Jones&lt;/a&gt;, &lt;a title="Emma Vieceli" href="http://emma.sweatdrop.com/" target="_blank" rel="nofollow"&gt;Emma Vieceli&lt;/a&gt;, &lt;a title="Lou Barr" href="http://blogs.ipona.com/frog" target="_blank" rel="nofollow"&gt;Lou Barr&lt;/a&gt;, &lt;a title="Ariana Osborne" href="http://www.arianaosborne.com" target="_blank" rel="nofollow"&gt;Ariana Osborne&lt;/a&gt;, &lt;a title="Julia Gilbert" href="http://www.catnipmusic.co.uk/" target="_blank" rel="nofollow"&gt;Julia Gilbert&lt;/a&gt; and &lt;a title="Vanessa Yaremchuk" href="http://impetuousheadlongrush.com" target="_blank" rel="nofollow"&gt;Vanessa Yaremchuk&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;These are the rules. Should you break them, do it in an interesting fashion...&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Link to the person who tagged you.  &lt;/li&gt;&lt;li&gt;Post the rules on the blog.  &lt;/li&gt;&lt;li&gt;Write six random things about yourself.  &lt;/li&gt;&lt;li&gt;Tag six people at the end of your post.  &lt;/li&gt;&lt;li&gt;Let each person know they have been tagged.  &lt;/li&gt;&lt;li&gt;Let the tagger know when your entry is up. &lt;/li&gt;&lt;/ol&gt;&lt;img src="http://blogs.ipona.com/dan/aggbug/8532.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=TjhXL"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=TjhXL" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=vRFCL"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=vRFCL" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Dan Maharry</dc:creator>
            <guid isPermaLink="false">http://blogs.ipona.com/dan/archive/2008/09/06/expressing-the-meme.aspx</guid>
            <pubDate>Sat, 06 Sep 2008 18:22:21 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/dan/comments/8532.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/dan/archive/2008/09/06/expressing-the-meme.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blogs.ipona.com/dan/comments/commentRss/8532.aspx</wfw:commentRss>
        <feedburner:origLink>http://blogs.ipona.com/dan/archive/2008/09/06/expressing-the-meme.aspx</feedburner:origLink></item>
        <item><title>Links for 2008-09-05 [del.icio.us]</title><link>http://feeds.feedburner.com/~r/DansArchive/~3/384780038/hmobius</link><pubDate>Sat, 06 Sep 2008 00:00:00 -0500</pubDate><guid isPermaLink="false">http://del.icio.us/hmobius#2008-09-05</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://weblogs.asp.net/steveschofield/archive/2008/09/04/iis6-to-iis7-migration-tips-tricks.aspx">IIS6 to IIS7 migration tips / tricks</a><br/>
Notes from Steve Schofield on migrating sites from iis6 to iis7</li>
<li><a href="http://learn.iis.net/page.aspx/244/how-to-take-advantage-of-the-iis7-integrated-pipeline/">How to Take Advantage of the IIS 7.0 Integrated Pipeline: Building and Running ASP.NET Applications: Hosting Applications on IIS 7.0</a></li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://weblogs.asp.net/steveschofield/archive/2008/09/04/iis6-to-iis7-migration-tips-tricks.aspx"&gt;IIS6 to IIS7 migration tips / tricks&lt;/a&gt;&lt;br/&gt;
Notes from Steve Schofield on migrating sites from iis6 to iis7&lt;/li&gt;
&lt;li&gt;&lt;a href="http://learn.iis.net/page.aspx/244/how-to-take-advantage-of-the-iis7-integrated-pipeline/"&gt;How to Take Advantage of the IIS 7.0 Integrated Pipeline: Building and Running ASP.NET Applications: Hosting Applications on IIS 7.0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><feedburner:origLink>http://del.icio.us/hmobius#2008-09-05</feedburner:origLink></item><item><title>Links for 2008-09-04 [del.icio.us]</title><link>http://feeds.feedburner.com/~r/DansArchive/~3/383881641/hmobius</link><pubDate>Fri, 05 Sep 2008 00:00:00 -0500</pubDate><guid isPermaLink="false">http://del.icio.us/hmobius#2008-09-04</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<ul>
<li><a href="http://blogs.msdn.com/rdoherty/archive/2008/09/03/sql-server-2008-top-10-list-for-developers.aspx">SQL Server 2008 Top 10 List for Developers</a></li>
</ul>]]></content:encoded><description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/rdoherty/archive/2008/09/03/sql-server-2008-top-10-list-for-developers.aspx"&gt;SQL Server 2008 Top 10 List for Developers&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><feedburner:origLink>http://del.icio.us/hmobius#2008-09-04</feedburner:origLink></item><item>
            <title>Programming ASP.NET 3.5 Is Slated For PDC</title>
            <category>Writing</category>
            <link>http://feeds.feedburner.com/~r/DansArchive/~3/380799582/programming-asp.net-3.5-is-slated-for-pdc.aspx</link>
            <description>&lt;p&gt;&lt;img title="Programming ASP.NET 3.5 Cover" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="240" alt="9780596529567_cat" src="http://oreilly.com/catalog/covers/9780596529567_cat.gif" width="184" align="right" border="0" /&gt; Well, it’s been a while coming but it looks like Programming ASP.NET 3.5 will finally hit the shelves in late October just in time for this year’s PDC. Hurrah! So, to take a leaf out of &lt;a title="John Papa thanks his book staff" href="http://johnpapa.net/data-services-with-silverlight-2/my-technical-review-team-rocks/" target="_blank" rel="nofollow"&gt;John Papa’s blog&lt;/a&gt;, it’s time to take a few seconds out and thank those who were involved in its creation.&lt;/p&gt; &lt;p&gt;First off, my co-authors &lt;a title="Jesse Liberty's blog" href="http://silverlight.net/blogs/jesseliberty/" target="_blank" rel="nofollow"&gt;Jesse Liberty&lt;/a&gt; and &lt;a title="Dan Hurwiz at Sterling Solutions" href="http://www.stersol.com" target="_blank" rel="nofollow"&gt;Dan Hurwitz&lt;/a&gt; for their support and words. And to &lt;a title="Lou Franco's blog" href="http://www.atalasoft.com/cs/blogs/loufranco/" target="_blank" rel="nofollow"&gt;Lou Franco&lt;/a&gt; and &lt;a title="Mike Pope's Blog" href="http://www.mikepope.com/blog/DisplayBlog.aspx" target="_blank" rel="nofollow"&gt;Mike Pope&lt;/a&gt; as well for their contributions to the book. They were both timely and well received by those of us all worded out. &lt;/p&gt; &lt;p /&gt; &lt;p&gt;Second, to the reviewing team for the necessary evil of reminding the authors that their words are not the be all and end all of the subject and should never treat them as such. Especially when trying to incorporate ever-changing technology into a set of static pages. So, to &lt;a title="Don Kiely's Blog" href="http://www.sqljunkies.com/weblog/donkiely/" target="_blank" rel="nofollow"&gt;Don Kiely&lt;/a&gt;, &lt;a title="Eugene Osovetsky's blog" href="http://eugeneos.blogspot.com" target="_blank" rel="nofollow"&gt;Eugene Osovetsky&lt;/a&gt;, &lt;a title="Frank Wang's Blog" href="http://geekswithblogs.net/frankw/Default.aspx" target="_blank" rel="nofollow"&gt;Frank Wang&lt;/a&gt;, &lt;a title="Scott Isaac's blog" href="http://siteexperts.spaces.live.com/default.aspx" target="_blank" rel="nofollow"&gt;Scott Isaacs&lt;/a&gt;, Christy Henriksson, &lt;a title="Kyle Beyer's Blog" href="http://daptivate.com/" target="_blank" rel="nofollow"&gt;Kyle Beyer&lt;/a&gt;, and &lt;a title="Miles Whitener on LinkedIn" href="http://www.linkedin.com/pub/7/240/a27" target="_blank" rel="nofollow"&gt;Miles Whitener&lt;/a&gt; my humble thanks, even if some of your comments made me want to throw the laptop in the bin because I knew you were right and it would mean writing another five or ten pages to cover the point.  &lt;a title="Lou Franco's blog" href="http://www.atalasoft.com/cs/blogs/loufranco/" target="_blank" rel="nofollow"&gt;Lou Franco&lt;/a&gt; and &lt;a title="Mike Pope's Blog" href="http://www.mikepope.com/blog/DisplayBlog.aspx" target="_blank" rel="nofollow"&gt;Mike Pope&lt;/a&gt; also get a second vote of thanks here because they not only provided really solid comments, they also decided to back their own comments up with words.&lt;/p&gt; &lt;p&gt;Next, thanks to the folks at O'Reilly. &lt;a title="Lou Barr's blog" href="http://blogs.ipona.com/frog/" target="_blank" rel="nofollow"&gt;Lou Barr&lt;/a&gt; initially mentioned me to &lt;a title="John Osborn's Page on OReillynet.com" href="http://www.oreillynet.com/pub/au/468" target="_blank" rel="nofollow"&gt;John Osborn&lt;/a&gt; as a potential co-author, so I thank her for the mention and John for getting in touch and then letting me get on with it at a pace I could manage. &lt;a title="Brian MacDonald on oreillynet.com" href="http://www.oreillynet.com/pub/au/2487" target="_blank" rel="nofollow"&gt;Brian MacDonald&lt;/a&gt;, Audrey Doyle and Rachel Monaghan have also been great as technical, copy and production editors respectively. I hope I'll work with them again (preferable on something smaller).&lt;/p&gt; &lt;p&gt;And finally, thanks to Jane for putting up with about thirteen or so months of the book-writing process. &lt;/p&gt; &lt;p&gt;Programming ASP.NET 3.5 is already up for pre-order on &lt;a class="amazon" href="http://www.amazon.co.uk/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.co.uk%2FProgramming-ASP-NET-3-5-Building-Applications%2Fdp%2F0596529562&amp;amp;tag=hmobiuscom-21&amp;amp;linkCode=ur2&amp;amp;camp=1634&amp;amp;creative=6738" target="_blank"&gt;Amazon UK&lt;/a&gt;&lt;img style="margin: 0px; border-top-style: none! important; border-right-style: none! important; border-left-style: none! important; border-bottom-style: none! important" height="1" alt="" src="http://www.assoc-amazon.co.uk/e/ir?t=hmobiuscom-21&amp;amp;l=ur2&amp;amp;o=2" width="1" border="0" /&gt; and &lt;a class="amazon" href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;amp;location=http%3A%2F%2Fwww.amazon.com%2FProgramming-ASP-NET-3-5-Jesse-Liberty%2Fdp%2F0596529562&amp;amp;tag=hmobiuscom-20&amp;amp;linkCode=ur2&amp;amp;camp=1789&amp;amp;creative=9325" target="_blank"&gt;Amazon US&lt;/a&gt;&lt;img style="margin: 0px; border-top-style: none! important; border-right-style: none! important; border-left-style: none! important; border-bottom-style: none! important" height="1" alt="" src="http://www.assoc-amazon.com/e/ir?t=hmobiuscom-20&amp;amp;l=ur2&amp;amp;o=1" width="1" border="0" /&gt;. Why not buy a copy?&lt;/p&gt;&lt;img src="http://blogs.ipona.com/dan/aggbug/8529.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=6hjgRL"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=6hjgRL" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=XKbJsL"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=XKbJsL" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Dan Maharry</dc:creator>
            <guid isPermaLink="false">http://blogs.ipona.com/dan/archive/2008/09/01/programming-asp.net-3.5-is-slated-for-pdc.aspx</guid>
            <pubDate>Mon, 01 Sep 2008 21:31:33 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/dan/comments/8529.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/dan/archive/2008/09/01/programming-asp.net-3.5-is-slated-for-pdc.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ipona.com/dan/comments/commentRss/8529.aspx</wfw:commentRss>
        <feedburner:origLink>http://blogs.ipona.com/dan/archive/2008/09/01/programming-asp.net-3.5-is-slated-for-pdc.aspx</feedburner:origLink></item>
        <item>
            <title>Red Gate Reflector</title>
            <category>.NET</category>
            <link>http://feeds.feedburner.com/~r/DansArchive/~3/370777498/red-gate-reflector.aspx</link>
            <description>&lt;p&gt;Well, it looks like one of the best .NET utilities out there has changed hands. Lutz Roeder, the original creator and developer of Reflector has agreed with Red Gate software (they of SQL Compare and SQL Toolkit fame) to let them continue development of it from now one. An interview with both Lutz and James Shore of Red Gate outlining the deal and what Red Gate hopes to do with Reflector can be found &lt;a title="Red Gate - Roeder interview" target="_blank" rel="nofollow" href="http://www.simple-talk.com/reflector/interview.htm"&gt;here on simple talk&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Red gate are quite clear that they “will continue to offer the tool for free to the community.” but don’t categorically state that they may not offer a corporate, paid-for version later down the line. As long as there’s a free version I’m not too fussed. Reflector’s new home is &lt;a title="Reflector at Red gate" target="_blank" rel="nofollow" href="http://reflector.red-gate.com/"&gt;http://reflector.red-gate.com/&lt;/a&gt;&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:55d252c7-41f1-4fd3-a72a-421debb37470" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;Technorati Tags: &lt;a rel="tag" href="http://technorati.com/tags/reflector"&gt;reflector&lt;/a&gt;,&lt;a rel="tag" href="http://technorati.com/tags/red+gate"&gt;red gate&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ipona.com/dan/aggbug/8525.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=RvNbRK"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=RvNbRK" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=9vaUlK"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=9vaUlK" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Dan Maharry</dc:creator>
            <guid isPermaLink="false">http://blogs.ipona.com/dan/archive/2008/08/21/red-gate-reflector.aspx</guid>
            <pubDate>Thu, 21 Aug 2008 08:20:22 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/dan/comments/8525.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/dan/archive/2008/08/21/red-gate-reflector.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ipona.com/dan/comments/commentRss/8525.aspx</wfw:commentRss>
        <feedburner:origLink>http://blogs.ipona.com/dan/archive/2008/08/21/red-gate-reflector.aspx</feedburner:origLink></item>
        <item>
            <title>RadioButton Groups, Table Rows And NamingContainers</title>
            <link>http://feeds.feedburner.com/~r/DansArchive/~3/364934066/RadioButton-Groups-Table-Rows-And-NamingContainers.aspx</link>
            <description>&lt;p&gt;(In which AJAX-enhanced CheckBoxes become more useful than RadioButtons but inheritance saves the day, and a simple RadioButton-derived control establishes the purpose of a control's naming container)&lt;/p&gt;  &lt;p&gt;The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their &lt;em&gt;name&lt;/em&gt; attributes. &lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="radio"&lt;/span&gt; &lt;strong&gt;&lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="RadioButtonList1"&lt;/span&gt;&lt;/strong&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt; &lt;span class="attr"&gt;for&lt;/span&gt;&lt;span class="kwrd"&gt;="RadioButtonList1_0"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Orlando Gee&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="radio"&lt;/span&gt; &lt;strong&gt;&lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="RadioButtonList1"&lt;/span&gt;&lt;/strong&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="2"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt; &lt;span class="attr"&gt;for&lt;/span&gt;&lt;span class="kwrd"&gt;="RadioButtonList1_1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Keith Harris&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;br&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="radio"&lt;/span&gt; &lt;strong&gt;&lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="RadioButtonList1"&lt;/span&gt;&lt;/strong&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="3"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt; &lt;span class="attr"&gt;for&lt;/span&gt;&lt;span class="kwrd"&gt;="RadioButtonList1_2"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Donna Carreras&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;

&lt;p&gt;And in ASP.NET, the &lt;em&gt;RadioButtonList&lt;/em&gt; control lets you set the name attribute for each radio button in the list using the control's &lt;em&gt;ID&lt;/em&gt; property.  &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:RadioButtonList&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="RadioButtonList1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;

&lt;p&gt;Alternately, you can group individual &lt;em&gt;RadioButton&lt;/em&gt; controls together using their &lt;em&gt;GroupName&lt;/em&gt; property. &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:RadioButton&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="rbSelectUnique"&lt;/span&gt; &lt;span class="attr"&gt;GroupName&lt;/span&gt;&lt;span class="kwrd"&gt;="selectList"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;

&lt;p&gt;And the effect is still the same; each HTML radio button (with the same GroupName) has its name attribute set to the same value. &lt;/p&gt;

&lt;h2&gt;The Problem&lt;/h2&gt;

&lt;p&gt;The main problem with RadioButtons though is that by default you cannot span a group of them across table rows. Let's take an example, I have a sortable, pageable GridView of customers which I like, but I want to make sure the user can select only one of those customers as we go down the list. The obvious (in my mind anyway) solution is to add a template field to the GridView containing a RadioButton for each row and make the table generated by a GridView into a big radio button list by setting their GroupName attribute the same. &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:GridView&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="GridView2"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;AutoGenerateColumns&lt;/span&gt;&lt;span class="kwrd"&gt;="False"&lt;/span&gt; &lt;span class="attr"&gt;DataKeyNames&lt;/span&gt;&lt;span class="kwrd"&gt;="customerid"&lt;/span&gt;
    &lt;span class="attr"&gt;DataSourceID&lt;/span&gt;&lt;span class="kwrd"&gt;="SqlDataSource1"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Columns&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:TemplateField&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:RadioButton&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="rbSelectUnique"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:TemplateField&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:BoundField&lt;/span&gt; &lt;span class="attr"&gt;DataField&lt;/span&gt;&lt;span class="kwrd"&gt;="name"&lt;/span&gt; &lt;span class="attr"&gt;HeaderText&lt;/span&gt;&lt;span class="kwrd"&gt;="name"&lt;/span&gt; &lt;span class="attr"&gt;ReadOnly&lt;/span&gt;&lt;span class="kwrd"&gt;="True"&lt;/span&gt; &lt;span class="attr"&gt;SortExpression&lt;/span&gt;&lt;span class="kwrd"&gt;="name"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:BoundField&lt;/span&gt; &lt;span class="attr"&gt;DataField&lt;/span&gt;&lt;span class="kwrd"&gt;="customerid"&lt;/span&gt; &lt;span class="attr"&gt;HeaderText&lt;/span&gt;&lt;span class="kwrd"&gt;="customerid"&lt;/span&gt; &lt;span class="attr"&gt;InsertVisible&lt;/span&gt;&lt;span class="kwrd"&gt;="False"&lt;/span&gt;
            &lt;span class="attr"&gt;ReadOnly&lt;/span&gt;&lt;span class="kwrd"&gt;="True"&lt;/span&gt; &lt;span class="attr"&gt;SortExpression&lt;/span&gt;&lt;span class="kwrd"&gt;="customerid"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Columns&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:GridView&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;

&lt;p&gt;Perfectly sensible except that because each RadioButton is dynamically added to a table row by the GridView, ASP.NET generates the &lt;em&gt;name &lt;/em&gt;attribute of each radio button by appending the value you give it in &lt;em&gt;GroupName&lt;/em&gt; to the internal name it generates for it when rendering the GridView. Hence we get this code for the &amp;lt;asp:GridView&amp;gt; above. &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt; &lt;span class="attr"&gt;cellspacing&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt; &lt;span class="attr"&gt;rules&lt;/span&gt;&lt;span class="kwrd"&gt;="all"&lt;/span&gt; &lt;span class="attr"&gt;border&lt;/span&gt;&lt;span class="kwrd"&gt;="1"&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="GridView2"&lt;/span&gt; &lt;span class="attr"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;="border-collapse:collapse;"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;th&lt;/span&gt; &lt;span class="attr"&gt;scope&lt;/span&gt;&lt;span class="kwrd"&gt;="col"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;th&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;th&lt;/span&gt; &lt;span class="attr"&gt;scope&lt;/span&gt;&lt;span class="kwrd"&gt;="col"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;name&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;th&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;th&lt;/span&gt; &lt;span class="attr"&gt;scope&lt;/span&gt;&lt;span class="kwrd"&gt;="col"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;customerid&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;th&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="GridView2_ctl02_rbSelectUnique"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="radio"&lt;/span&gt; 
            &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="GridView2$ctl02$rbSelectUnique"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="rbSelectUnique"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Orlando Gee&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="GridView2_ctl03_rbSelectUnique"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="radio"&lt;/span&gt; 
            &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="GridView2$ctl03$rbSelectUnique"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="rbSelectUnique"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Keith Harris&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;2&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;="GridView2_ctl04_rbSelectUnique"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="radio"&lt;/span&gt; 
            &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;="GridView2$ctl04$rbSelectUnique"&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;="rbSelectUnique"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Donna Carreras&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;3&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;

&lt;p&gt;As you can see, the radio button's name value takes the form &lt;em&gt;GridView2$ctlXX$rbSelectUnique&lt;/em&gt;, where XX changes for each row and renders the list of the radio buttons useless. You can select them all at the same time if you wish. And it turns out that this issue is by design, according to &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=102304" target="_blank"&gt;the bug report on MS Connect&lt;/a&gt;. &lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Each row in a GridView is its own naming container so the controls' names don't collide. However, RadioButtons do not support spanning multiple naming containers and having their groupname attribute still work correctly. We will be looking at solving the RadioButton GroupName/multiple naming container issue in future versions of the product.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Or, in English, asp.net generates a unique NamingContainer for each cell in a table generated by a GridView and then uses that as a basis for all control IDs within the cell. It seems to be the only way to keep track of which events occurred where when the page posts back.  That was written in April 2005 and it hasn't been fixed in VS2008, so it's time to look at workarounds. &lt;/p&gt;

&lt;h2&gt;The Solution&lt;/h2&gt;

&lt;p&gt;If you're using AJAX already on the page, or are prepared to use it on the page, one way to get a radio button list of sorts into your GridView is to use checkboxes and a &lt;em&gt;MutuallyExclusiveCheckBoxExtender&lt;/em&gt; in each TemplateField.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:CheckBox&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="chkSelect"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:MutuallyExclusiveCheckBoxExtender&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="mecbe1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; 
        &lt;span class="attr"&gt;Key&lt;/span&gt;&lt;span class="kwrd"&gt;="chkSelectGroup"&lt;/span&gt; &lt;span class="attr"&gt;TargetControlID&lt;/span&gt;&lt;span class="kwrd"&gt;="chkSelect"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;

&lt;p&gt;Now this works fine, but if you're trying to keep your pages lean, the additional script for each MECBE added to the page might not be so good. From a UI point of view, you might also object to having checkboxes work like radio buttons and so might your users. &lt;/p&gt;

&lt;p&gt;Fortunately, a quick check in Visual Studio’s Object Browser reveals that the RadioButton derives from a CheckBox, so you can easily swap out one for the other. And behold your RadioButtonList is back, spanning table rows.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:RadioButton&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="rbSelect"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc1:MutuallyExclusiveCheckBoxExtender&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="mecbe1"&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; 
        &lt;span class="attr"&gt;Key&lt;/span&gt;&lt;span class="kwrd"&gt;="rbSelectGroup"&lt;/span&gt; &lt;span class="attr"&gt;TargetControlID&lt;/span&gt;&lt;span class="kwrd"&gt;="rbSelect"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;

&lt;h2&gt;Not The Solution, But Good To Know&lt;/h2&gt;

&lt;p&gt;If you’re not willing to use AJAX, the issue is always with the naming container clashing with the radio button list’s name property. Perhaps an obvious solution is to use your own RadioButton Control which overrides the name attribute for the button when it is rendered. Something like this.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.ComponentModel;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.IO;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text.RegularExpressions;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; TryOuts
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; MyRadioButton : RadioButton
    {
        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GroupName2
        {
            get  {
                String s = (String)ViewState[&lt;span class="str"&gt;"GroupName2"&lt;/span&gt;];
                &lt;span class="kwrd"&gt;return&lt;/span&gt; ((s == &lt;span class="kwrd"&gt;null&lt;/span&gt;) ? &lt;span class="str"&gt;""&lt;/span&gt; : s); }
            set { ViewState[&lt;span class="str"&gt;"GroupName2"&lt;/span&gt;] = &lt;span class="kwrd"&gt;value&lt;/span&gt;; }
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; Checked
        {
            get { &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;base&lt;/span&gt;.Checked; }
            set { &lt;span class="kwrd"&gt;base&lt;/span&gt;.Checked = &lt;span class="kwrd"&gt;value&lt;/span&gt;; }
        }

        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Render(HtmlTextWriter writer)
        {
            StringBuilder sb = &lt;span class="kwrd"&gt;new&lt;/span&gt; StringBuilder();
            StringWriter sw = &lt;span class="kwrd"&gt;new&lt;/span&gt; StringWriter(sb);
            HtmlTextWriter hw = &lt;span class="kwrd"&gt;new&lt;/span&gt; HtmlTextWriter(sw);

            &lt;span class="kwrd"&gt;base&lt;/span&gt;.Render(hw);

            &lt;span class="kwrd"&gt;if&lt;/span&gt; (String.IsNullOrEmpty(GroupName2))
            {
                writer.Write(sb.ToString());
            }
            &lt;span class="kwrd"&gt;else&lt;/span&gt;
            {
                &lt;span class="kwrd"&gt;string&lt;/span&gt; html = Regex.Replace(
                   sb.ToString(), &lt;span class="str"&gt;@"name="&lt;/span&gt;&lt;span class="str"&gt;"[\w\$]+"&lt;/span&gt;&lt;span class="str"&gt;""&lt;/span&gt;, 
                   String.Format(&lt;span class="str"&gt;"name=\"{0}\""&lt;/span&gt;, GroupName2));
                writer.Write(html);
            }
        }
    }
}&lt;/pre&gt;

&lt;p&gt;Now this approach works to a degree. Replacing a standard RadioButton with this control does indeed override the control’s Name property and the RadioButtons all work within the table as required. &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;cc2:MyRadioButton&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="mrbTest"&lt;/span&gt; &lt;span class="attr"&gt;GroupName2&lt;/span&gt;&lt;span class="kwrd"&gt;="test"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;However, do anything simple such as select a row and post back the page (by clicking a button) and you’ll see that you can’t determine which radio button has been clicked. &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;foreach&lt;/span&gt; (GridViewRow row &lt;span class="kwrd"&gt;in&lt;/span&gt; GridView.Rows)
{
   RadioButton rb = (RadioButton)row.FindControl(&lt;span class="str"&gt;"mrbTest"&lt;/span&gt;);
   &lt;span class="kwrd"&gt;if&lt;/span&gt; (rb.Checked)
   {
      lblSelected.Text = row.Cells[1].Text;
   }
}&lt;/pre&gt;

&lt;p&gt;And that’s because the NamingContainers for the cells containing the RadioButtons in the table generated in the GridView can no longer identify the RadioButtons in the cells in the table. Because our custom control has overridden the name attribute for each RadioButton to “test”, ASP.NET can’t find any controls called GridView2$ctlXX$mrbTest which is what it expects them to be called and why the naming container exists in the first place. Without the naming container producing these unique names in the way it does, we can’t do useful things like iterate over the rows in a GridView and why AJAX is the way forward when it comes to this particular problem.&lt;/p&gt;

&lt;p&gt;Now strictly speaking, it should be possible to write a HttpModule that rewrites a RadioButton’s name attribute as it is sent to the browser so it works as part of a RadioButtonList and then rewrites the name attribute back as the page is posted back so the naming container appears to still be intact. But think about it, that’s a lot of effort for a small thing. Is the AJAX-free convenience worth the hassle?&lt;/p&gt;&lt;img src="http://blogs.ipona.com/dan/aggbug/8523.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=fVRPVK"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=fVRPVK" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=R2wLWK"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=R2wLWK" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Dan Maharry</dc:creator>
            <guid isPermaLink="false">http://blogs.ipona.com/dan/archive/2008/08/14/RadioButton-Groups-Table-Rows-And-NamingContainers.aspx</guid>
            <pubDate>Thu, 14 Aug 2008 16:42:51 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/dan/comments/8523.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/dan/archive/2008/08/14/RadioButton-Groups-Table-Rows-And-NamingContainers.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blogs.ipona.com/dan/comments/commentRss/8523.aspx</wfw:commentRss>
        <feedburner:origLink>http://blogs.ipona.com/dan/archive/2008/08/14/RadioButton-Groups-Table-Rows-And-NamingContainers.aspx</feedburner:origLink></item>
        <item>
            <title>Three Different Ways To Find The Currently Edited Row In A GridView</title>
            <category>.NET</category>
            <category>Software</category>
            <link>http://feeds.feedburner.com/~r/DansArchive/~3/356554703/Three-Different-Ways-To-Find-The-Currently-Edited-Row-In.aspx</link>
            <description>&lt;p&gt;The GridView, and indeed all the other templated data bound controls, are lifeblood to an ASP.NET developer when it comes to creating websites. A little DataSource control here, a GridView there and even if it isn't exactly what you want, you've got a prototype page up and running in no time to start the real development with. Today's chores involved tweaking the contents of a GridView's EditItemTemplate so that the contents of one DropDownList (Clients) would change based on the contents of another (Roles) and should the Update button be clicked the values of both DropDownLists saved out to the database.&lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://blogs.ipona.com/images/blogs_ipona_com/dan/WindowsLiveWriter/ThreeDifferentWaysToFindTheCurrentlyEdit_FF3B/EditItemTemplate.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="69" alt="EditItemTemplate" src="http://blogs.ipona.com/images/blogs_ipona_com/dan/WindowsLiveWriter/ThreeDifferentWaysToFindTheCurrentlyEdit_FF3B/EditItemTemplate_thumb.png" width="640" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The roles DropDownList always contained the same items, so it was bound to a DataSource control separate to the GridView itself and then its selected value bound to the current value for the row in the GridView. The RoleId is two-way bound to the SelectedValue of the DropDownList so clicking Update works correctly. &lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;EditItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:DropDownList&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;="server"&lt;/span&gt; &lt;span class="attr"&gt;ID&lt;/span&gt;&lt;span class="kwrd"&gt;="ddlRolesForEditUserDialog"&lt;/span&gt; &lt;span class="attr"&gt;AutoPostBack&lt;/span&gt;&lt;span class="kwrd"&gt;="true"&lt;/span&gt;
      &lt;span class="attr"&gt;DataTextField&lt;/span&gt;&lt;span class="kwrd"&gt;="Name"&lt;/span&gt; &lt;span class="attr"&gt;DataValueField&lt;/span&gt;&lt;span class="kwrd"&gt;="RoleId"&lt;/span&gt; 
      &lt;span class="attr"&gt;DataSourceID&lt;/span&gt;&lt;span class="kwrd"&gt;="RolesDataSource"&lt;/span&gt; &lt;span class="attr"&gt;SelectedValue&lt;/span&gt;&lt;span class="kwrd"&gt;='&amp;lt;%# Bind("RoleId") %&amp;gt;'&lt;/span&gt;
      &lt;span class="attr"&gt;OnSelectedIndexChanged&lt;/span&gt;&lt;span class="kwrd"&gt;="ddlRolesForEditUserDialog_SelectedIndexChanged"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;EditItemTemplate&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;The clients DropDownList on the other hand, needed &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;to be populated dynamically when the the GridView's row was switched to Edit mode &lt;/li&gt;
&lt;li&gt;to be populated dynamically when the choice in the roles List changed.  &lt;/li&gt;
&lt;li&gt;to be accessed when Update is clicked and the DataSource is making changes to the database.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;As it turns out, each occasion used a slightly different way to find the row being edited and through that, using FindControl to access the ClientList.&lt;/p&gt;
&lt;p&gt;In case 1, by the time a GridView's OnRowEditing event (raised when 'Edit' is clicked on the GridView) is handled, the EditItemTemplate for the row hasn't become accessible yet, so the client list can't be found. The option instead then is to handle the GridView's OnRowDataBound event at which point the EditItemTemplate has been created and the client list is accessible. The trick is to identify the row being edited is to use its RowState property. Every row on a GridView is rebound when Edit is clicked, so we can use the following. &lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; grdUsers_RowDataBound(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, GridViewRowEventArgs e)
{
   &lt;span class="kwrd"&gt;if&lt;/span&gt; ((e.Row.RowState == DataControlRowState.Edit) || 
       (e.Row.RowState == (DataControlRowState.Edit|DataControlRowState.Alternate)))
   {
      &lt;span class="rem"&gt;//Get the client dropdownlist&lt;/span&gt;
      DropDownList clientList = (DropDownList)e.Row.FindControl(&lt;span class="str"&gt;"ddlClients"&lt;/span&gt;);

      &lt;span class="rem"&gt;//more stuff here&lt;/span&gt;
   }
}&lt;/pre&gt;
&lt;p&gt;In case 2, the EditItemTemplate already exists. Indeed, we're capturing an event on the roles List within a cell in the EditItemTemplate. One option to then find the client List in the cell next to it is to start with the object that raised the event, find the control that contains both it and the client List and then call FindControl.&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; RulesList_SelectedIndexChanged(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)
{
   &lt;span class="rem"&gt;//Get the roles dropdownlist&lt;/span&gt;
   DropDownList ddlRoles = (DropDownList)sender;

   &lt;span class="rem"&gt;//Get the client dropdownlist&lt;/span&gt;
   DropDownList clientList = 
      (DropDownList)ddlRoles.Parent.Parent.FindControl(&lt;span class="str"&gt;"ddlClients"&lt;/span&gt;);

   &lt;span class="rem"&gt;// more stuff here&lt;/span&gt;
}&lt;/pre&gt;
&lt;p&gt;Or, as in Case 3, because we know the EditItemTemplate is visible, we can locate the row being edited through the GridView's EditIndex template. This returns -1 if no row is being edited or the index of a row in the GridView. &lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; usersDataSource_Updating(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)
{
   GridViewRow row = grdUsers.Rows[grdUsers.EditIndex];
   DropDownList clientList = (DropDownList)row.FindControl(&lt;span class="str"&gt;"ddlClients"&lt;/span&gt;);

   &lt;span class="rem"&gt;// more stuff here&lt;/span&gt;

}&lt;/pre&gt;
&lt;p&gt;Case 3 is the easiest way to find the currently edited row, though the other two are no less valid. &lt;/p&gt;&lt;img src="http://blogs.ipona.com/dan/aggbug/8522.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=R1QUhK"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=R1QUhK" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=2yj5LK"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=2yj5LK" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Dan Maharry</dc:creator>
            <guid isPermaLink="false">http://blogs.ipona.com/dan/archive/2008/08/05/Three-Different-Ways-To-Find-The-Currently-Edited-Row-In.aspx</guid>
            <pubDate>Tue, 05 Aug 2008 16:06:50 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/dan/comments/8522.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/dan/archive/2008/08/05/Three-Different-Ways-To-Find-The-Currently-Edited-Row-In.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blogs.ipona.com/dan/comments/commentRss/8522.aspx</wfw:commentRss>
        <feedburner:origLink>http://blogs.ipona.com/dan/archive/2008/08/05/Three-Different-Ways-To-Find-The-Currently-Edited-Row-In.aspx</feedburner:origLink></item>
        <item>
            <title>Is this the truth of it?</title>
            <category>Brainjuice</category>
            <link>http://feeds.feedburner.com/~r/DansArchive/~3/355734164/Is-this-the-truth-of-it.aspx</link>
            <description>&lt;blockquote&gt; &lt;p&gt;Achieving perpetual mass for any community only takes place if the underlying purpose of the community is appealing to enough users that they decide to contribute some of their cognitive surplus to its furtherance.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;More of that discussion &lt;a href="http://freakangels.com/whitechapel/comments.php?DiscussionID=3115" target="_blank" rel="nofollow"&gt;here&lt;/a&gt;. Discuss&lt;/p&gt;&lt;img src="http://blogs.ipona.com/dan/aggbug/8520.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=Hsy3WK"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=Hsy3WK" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=tV7iMK"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=tV7iMK" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Dan Maharry</dc:creator>
            <guid isPermaLink="false">http://blogs.ipona.com/dan/archive/2008/08/04/Is-this-the-truth-of-it.aspx</guid>
            <pubDate>Mon, 04 Aug 2008 20:49:21 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/dan/comments/8520.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/dan/archive/2008/08/04/Is-this-the-truth-of-it.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ipona.com/dan/comments/commentRss/8520.aspx</wfw:commentRss>
        <feedburner:origLink>http://blogs.ipona.com/dan/archive/2008/08/04/Is-this-the-truth-of-it.aspx</feedburner:origLink></item>
        <item>
            <title>Enabling SSL Certificates on any Given HTTP Port</title>
            <link>http://feeds.feedburner.com/~r/DansArchive/~3/352503734/Enabling-SSL-Certificates-on-any-Given-HTTP-Port.aspx</link>
            <description>&lt;p&gt;Following on from my travails with &lt;a href="http://blogs.ipona.com/dan/archive/2008/07/28/Enabling-HttpListeners-for-NonAdmins.aspx" target="_blank"&gt;HttpListeners not working as a non-admin user&lt;/a&gt;, it turned out that the Cardspace samples (&lt;a href="http://netfx3.com/files/folders/cardspace_samples/default.aspx"&gt;download them here&lt;/a&gt; if you're interested) had one more sticking point up their sleeve before everything worked. The main example demonstrates how a simple Security Token Service is used to verify the managed card a user wants to send to a site. However, the service is accessible only through the HTTPS protocol on port 7001 and Cardspace was unable to access it. A little digging revealed that the setup scripts for the sample tried and failed to build a copy of httpcfg, a utility found on Windows Server 2003. I didn't have the necessary files to build &lt;a href="http://technet2.microsoft.com/windowsserver/en/library/e17527d2-105a-451f-8e3f-d515479527011033.mspx?mfr=true" target="_blank"&gt;httpcfg&lt;/a&gt; successfully, bit it turns out that the &lt;a href="http://support.microsoft.com/kb/242468" target="_blank"&gt;netsh&lt;/a&gt; utility that comes with Vista and &lt;a href="http://blogs.ipona.com/dan/archive/2008/07/28/Enabling-HttpListeners-for-NonAdmins.aspx" target="_blank"&gt;helped me out previously&lt;/a&gt; could also help me out here to.&lt;/p&gt; &lt;p&gt;The command required to add the certificate to a port with netsh is &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;netsh http add sslcert ipport=0.0.0.0:7001 certhash=&lt;em&gt;thumbprint&lt;/em&gt; appid=&lt;em&gt;arbitrary_guid&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;And the corresponding one to remove it is&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;netsh http delete sslcert ipport=0.0.0.0:7001&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The add command needs two pieces of information besides the port number. &lt;/p&gt; &lt;ul&gt; &lt;li&gt;appid is an arbitrary guid to represent the application accessing the port.&lt;/li&gt; &lt;li&gt;certhash requires the certificate's thumbprint to identify it to netsh&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;If you've never needed to find a certificate's thumbprint before, hit Win+R and run certmgr.msc from the prompt to open the Vista Certificates MMC Viewer. (If the certificate is stored in the Local Machine certificate store rather than your own accounts store, you'll need to run certmgr.msc as an admin). The certificate should be stored in Personal\Certificates. When you find it, double-click it and select the Details tab. If you scroll the view down, you'll see Thumbprint towards the bottom of the dialog.&lt;/p&gt; &lt;p align="center"&gt;&lt;a href="http://blogs.ipona.com/images/blogs_ipona_com/dan/WindowsLiveWriter/EnablingSSLCertificatesonanyGivenHTTPPor_A576/CertThumbprint.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="519" alt="CertThumbprint" src="http://blogs.ipona.com/images/blogs_ipona_com/dan/WindowsLiveWriter/EnablingSSLCertificatesonanyGivenHTTPPor_A576/CertThumbprint_thumb.png" width="419" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;You'll need to copy all 20 pairs of hex digits and remove all the spaces. Given the example above then, you can add the certificate shown to port 7001 using this command.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;netsh http add sslcert ipport=0.0.0.0:7001 certhash=d47de657fa4902555902cb7f0edd2ba9b05debb8 appid={C61EC2E2-BC18-4522-903B-F44A56299787}&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;And then you can check that all's well with this command&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;netsh http show sslcert&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This will show you all the certificates bound to a port on your machine. &lt;a href="http://support.microsoft.com/kb/242468" target="_blank"&gt;netsh&lt;/a&gt; - the network admin's swiss army knife&lt;/p&gt;&lt;img src="http://blogs.ipona.com/dan/aggbug/8518.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=ljPO0K"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=ljPO0K" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=16YTSK"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=16YTSK" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Dan Maharry</dc:creator>
            <guid isPermaLink="false">http://blogs.ipona.com/dan/archive/2008/08/01/Enabling-SSL-Certificates-on-any-Given-HTTP-Port.aspx</guid>
            <pubDate>Fri, 01 Aug 2008 10:45:19 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/dan/comments/8518.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/dan/archive/2008/08/01/Enabling-SSL-Certificates-on-any-Given-HTTP-Port.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ipona.com/dan/comments/commentRss/8518.aspx</wfw:commentRss>
        <feedburner:origLink>http://blogs.ipona.com/dan/archive/2008/08/01/Enabling-SSL-Certificates-on-any-Given-HTTP-Port.aspx</feedburner:origLink></item>
        <item>
            <title>Enabling HttpListeners for Non-Admins</title>
            <category>.NET</category>
            <category>Software</category>
            <category>Tech</category>
            <category>Vista</category>
            <link>http://feeds.feedburner.com/~r/DansArchive/~3/348410687/Enabling-HttpListeners-for-NonAdmins.aspx</link>
            <description>&lt;p&gt;I've just started working through the Cardspace samples to learn some more about online identity layers (&lt;a href="http://netfx3.com/files/folders/cardspace_samples/default.aspx" target="_blank"&gt;download them here&lt;/a&gt; if you're interested). The first example demonstrates a web service running on http://localhost:4123 requesting a certificate from a client. However, as a non-admin, I get the following error from Visual Studio when running the sample.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;AddressAccessDeniedException was unhandled&lt;br /&gt;HTTP could not register URL http://+:4123/HelloService/. Your process does not have access rights to this namespace&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Coincidentally, the error is totally analogous to a similar problem I've had while trying out &lt;a href="http://code.google.com/p/cr-documentor" target="_blank"&gt;the CR_Documentor plug-&lt;/a&gt;in that &lt;a href="http://paraesthesia.com/" target="_blank"&gt;Travis Illig&lt;/a&gt; has created and it's Travis and co that figured out both problems in hindsight. To &lt;a href="http://code.google.com/p/cr-documentor/issues/detail?id=10" target="_blank"&gt;paraphrase&lt;/a&gt;, &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;By default, only local admins have permission to listen to http prefixes. Other accounts require explicit grant using either httpcfg.exe for WinXp/2003 users or netsh for Vista/2008 users. This isn't a .net permission, it goes right to the windows urlacl level.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Just as this cardspace demo relies on port 4123 being accessible, so too does CR_Documentor rely on port 11235. The full commands to call either can be found here, explaining the various options.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://blogs.msdn.com/drnick/archive/2006/10/16/configuring-http-for-windows-vista.aspx"&gt;http://blogs.msdn.com/drnick/archive/2006/10/16/configuring-http-for-windows-vista.aspx&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms733768.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms733768.aspx&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Thus, to solve my cardspace problem, I needed to open a command prompt as an admin and run the following command to match the URL given in the error dialog.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;netsh http add urlacl url=http://+:4123/ user=cweb\dan&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;And hey presto, I can continue debugging my web services as a standard user. &lt;/p&gt; &lt;p&gt;Thanks again to Travis and the CR_Documentor guys for figuring this one out and explaining it &lt;a href="http://code.google.com/p/cr-documentor/issues/detail?id=10" target="_blank"&gt;here&lt;/a&gt;. I'm just passing on the info&lt;/p&gt;&lt;img src="http://blogs.ipona.com/dan/aggbug/8516.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=6WohmJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=6WohmJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=dBXoGJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=dBXoGJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Dan Maharry</dc:creator>
            <guid isPermaLink="false">http://blogs.ipona.com/dan/archive/2008/07/28/Enabling-HttpListeners-for-NonAdmins.aspx</guid>
            <pubDate>Mon, 28 Jul 2008 12:50:19 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/dan/comments/8516.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/dan/archive/2008/07/28/Enabling-HttpListeners-for-NonAdmins.aspx#feedback</comments>
            <wfw:commentRss>http://blogs.ipona.com/dan/comments/commentRss/8516.aspx</wfw:commentRss>
        <feedburner:origLink>http://blogs.ipona.com/dan/archive/2008/07/28/Enabling-HttpListeners-for-NonAdmins.aspx</feedburner:origLink></item>
        <item>
            <title>Tutorials</title>
            <category>Brainjuice</category>
            <link>http://feeds.feedburner.com/~r/DansArchive/~3/345486173/Tutorials.aspx</link>
            <description>&lt;p&gt;Note to self, there are some good tutorials and 101s out there which should help a lot in a few areas. Make time to get through &lt;/p&gt; &lt;ul&gt; &lt;li&gt;Eric White's &lt;a href="http://blogs.msdn.com/ericwhite/pages/FP-Tutorial.aspx" target="_blank"&gt;Functional Programming&lt;/a&gt; tutorial. Back it up with the &lt;a href="http://blog.functionalfun.net/search/label/Project%20Euler" target="_blank"&gt;Project Euler&lt;/a&gt; series.&lt;/li&gt; &lt;li&gt;Rob Conery's &lt;a href="http://blog.wekeroad.com/mvc-storefront/" target="_blank"&gt;MVC Storefront&lt;/a&gt; series&lt;/li&gt; &lt;li&gt;Chris Mills' &lt;a href="http://www.opera.com/wsc/" target="_blank"&gt;Web Standards Curriculum&lt;/a&gt; because foundations are important&lt;/li&gt; &lt;li&gt;Mike Taulty's &lt;a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/category/1015.aspx" target="_blank"&gt;Silverlight 2&lt;/a&gt; series &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I'm looking for a good one on Ruby and on Javascript as well. Anyone got anything good? The new &lt;a href="http://javascript-frameworks.wrox.com/wiki" target="_blank"&gt;Wrox First wiki on Javascript frameworks&lt;/a&gt; looks good, but it does cost.&lt;/p&gt;&lt;img src="http://blogs.ipona.com/dan/aggbug/8515.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=uCaGOJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=uCaGOJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=FwmM9J"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=FwmM9J" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Dan Maharry</dc:creator>
            <guid isPermaLink="false">http://blogs.ipona.com/dan/archive/2008/07/25/Tutorials.aspx</guid>
            <pubDate>Fri, 25 Jul 2008 08:17:10 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/dan/comments/8515.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/dan/archive/2008/07/25/Tutorials.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://blogs.ipona.com/dan/comments/commentRss/8515.aspx</wfw:commentRss>
        <feedburner:origLink>http://blogs.ipona.com/dan/archive/2008/07/25/Tutorials.aspx</feedburner:origLink></item>
        <item>
            <title>Assert.AreValueEqual</title>
            <category>.NET</category>
            <category>MbUnit</category>
            <category>Test-Driven Development</category>
            <link>http://feeds.feedburner.com/~r/DansArchive/~3/341953681/Assert.AreValueEqual.aspx</link>
            <description>&lt;p&gt;One of the interesting aspects of backfilling documentation is uncovering methods few seem to have discovered. Case in point, the Assert.AreValueEqual method in MbUnit v2. Rather than the straightforward AreEqual methods to compare the values of a property in an object or the AreSame methods to compare whether two objects are actually the identical object or of the same type, AreValueEqual verifies that two objects, expected and actual, &lt;/p&gt; &lt;ul&gt; &lt;li&gt;both have a property described a &lt;a title="The PropertyInfo class on MSDN" href="http://msdn.microsoft.com/en-gb/library/system.reflection.propertyinfo.aspx" target="_blank" rel="nofollow"&gt;PropertyInfo&lt;/a&gt; object,  &lt;/li&gt;&lt;li&gt;that the property is not null,  &lt;/li&gt;&lt;li&gt;and that the value of the property in both objects is equal.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;It's a bit of a black box tester then and works across class hierarchies.&lt;/p&gt; &lt;p&gt;AreValueEqual takes three parameters and an optional fourth.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;The &lt;a title="The PropertyInfo class on MSDN" href="http://msdn.microsoft.com/en-gb/library/system.reflection.propertyinfo.aspx" target="_blank" rel="nofollow"&gt;PropertyInfo&lt;/a&gt; object indicating the property to be tested  &lt;/li&gt;&lt;li&gt;The object containing the expected value of the property  &lt;/li&gt;&lt;li&gt;The object containing the actual value of the property  &lt;/li&gt;&lt;li&gt;The index of the value to compare in the property if it is an indexed property&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Let's take a few examples to demonstrate its various pass and fail scenarios. First, some boilerplate. You'll need to include System.Reflection for the PropertyInfo class and MbUnit.Framework for the Assert class.&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Reflection;
&lt;span class="kwrd"&gt;using&lt;/span&gt; MbUnit.Framework;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; MbUnitAssertDocs
{
   [TestFixture]
   &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; AreValueEqualTests
   {&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The first test passes as it compares the Length property of two string arrays both containing four strings. Only the Lenght property is being tested here, so whether the strings are equal is irrelevant&lt;/p&gt;&lt;pre class="csharpcode"&gt;      &lt;span class="rem"&gt;//This test passes&lt;/span&gt;
      [Test]
      &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; AreValueEqual_SameValues()
      {
         &lt;span class="rem"&gt;// Create two arrays&lt;/span&gt;
         String[] a = &lt;span class="kwrd"&gt;new&lt;/span&gt; String[4] { &lt;span class="str"&gt;"this"&lt;/span&gt;, &lt;span class="str"&gt;"is"&lt;/span&gt;, &lt;span class="str"&gt;"a"&lt;/span&gt;, &lt;span class="str"&gt;"test"&lt;/span&gt; };
         String[] b = &lt;span class="kwrd"&gt;new&lt;/span&gt; String[4] { &lt;span class="str"&gt;"this"&lt;/span&gt;, &lt;span class="str"&gt;"is"&lt;/span&gt;, &lt;span class="str"&gt;"a"&lt;/span&gt;, &lt;span class="str"&gt;"camel"&lt;/span&gt; };
      
         &lt;span class="rem"&gt;// Generate the PropertyInfo object for an array's length&lt;/span&gt;
         PropertyInfo pi = &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(Array).GetProperty(&lt;span class="str"&gt;"Length"&lt;/span&gt;);
         Assert.AreValueEqual(pi, a, b);
      }&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The next test also passes and demonstrates using the optional fourth parameter to test the value of an indexed property. In this case, we're treating a String object as an array of Char and testing the fourth character.&lt;/p&gt;&lt;pre class="csharpcode"&gt;      &lt;span class="rem"&gt;//This test passes&lt;/span&gt;
      [Test]
      &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; AreValueEqual_SameValuesUsingIndices()
      {
         &lt;span class="rem"&gt;// Create two strings&lt;/span&gt;
         String a = &lt;span class="str"&gt;"this is a test"&lt;/span&gt;;
         String b = &lt;span class="str"&gt;"this is a camel"&lt;/span&gt;;

         &lt;span class="rem"&gt;// Generate the PropertyInfo object for the string as a Char array &lt;/span&gt;
         PropertyInfo pi = &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(String).GetProperty(&lt;span class="str"&gt;"Chars"&lt;/span&gt;);

         &lt;span class="rem"&gt;// Test the fourth letter&lt;/span&gt;
         Assert.AreValueEqual(pi, a, b, &lt;span class="kwrd"&gt;new&lt;/span&gt; Object[] {4});
      }&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If one of the objects being tested is null, the test fails with an AssertionException.&lt;/p&gt;&lt;pre class="csharpcode"&gt;      &lt;span class="rem"&gt;// This test fails with an AssertionException&lt;/span&gt;
      [Test]
      &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; AreValueEqual_OneValueIsNull()
      {
         &lt;span class="rem"&gt;// Create two arrays&lt;/span&gt;
         String[] a = &lt;span class="kwrd"&gt;new&lt;/span&gt; String[4] { &lt;span class="str"&gt;"this"&lt;/span&gt;, &lt;span class="str"&gt;"is"&lt;/span&gt;, &lt;span class="str"&gt;"a"&lt;/span&gt;, &lt;span class="str"&gt;"test"&lt;/span&gt; };
      
         &lt;span class="rem"&gt;// Generate the PropertyInfo object for an array's length&lt;/span&gt;
         PropertyInfo pi = &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(Array).GetProperty(&lt;span class="str"&gt;"Length"&lt;/span&gt;);
      
         Assert.AreValueEqual(pi, a, &lt;span class="kwrd"&gt;null&lt;/span&gt;);
      }&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;If one of the objects does not have the property specified by the PropertyInfo object, the test also fails with an AssertionException. This next test fails because the &lt;strong&gt;S&lt;/strong&gt;tring reference class has a Chars property while the &lt;strong&gt;s&lt;/strong&gt;tring value type does not. (One capitalised letter makes all the difference)&lt;/p&gt;&lt;pre class="csharpcode"&gt;      &lt;span class="rem"&gt;//This test fails with an AssertionException&lt;/span&gt;
      [Test]
      &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; AreValueEqual_PropertyNotPresentInOneObject()
      {
         &lt;span class="rem"&gt;// Create two arrays&lt;/span&gt;
         String[] a = &lt;span class="kwrd"&gt;new&lt;/span&gt; String[4] { &lt;span class="str"&gt;"this"&lt;/span&gt;, &lt;span class="str"&gt;"is"&lt;/span&gt;, &lt;span class="str"&gt;"a"&lt;/span&gt;, &lt;span class="str"&gt;"test"&lt;/span&gt; };
         &lt;span class="kwrd"&gt;string&lt;/span&gt;[] b = &lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt;[4] { &lt;span class="str"&gt;"this"&lt;/span&gt;, &lt;span class="str"&gt;"is"&lt;/span&gt;, &lt;span class="str"&gt;"a"&lt;/span&gt;, &lt;span class="str"&gt;"camel"&lt;/span&gt; };
      
         &lt;span class="rem"&gt;// Generate the PropertyInfo object for an array's length&lt;/span&gt;
         PropertyInfo pi = &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(Array).GetProperty(&lt;span class="str"&gt;"Chars"&lt;/span&gt;);
      
         Assert.AreValueEqual(pi, a, b, &lt;span class="kwrd"&gt;new&lt;/span&gt; Object[] {4});
      }&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Finally, if the value of the property shared by the two objects does not have the same value, the test fails with a NotEqualAssertionException.&lt;/p&gt;&lt;pre class="csharpcode"&gt;      &lt;span class="rem"&gt;//This test fails with a NotEqualAssertionException&lt;/span&gt;
      [Test]
      &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; AreValueEqual_DifferentValues()
      {
         &lt;span class="rem"&gt;// Create two strings&lt;/span&gt;
         String a = &lt;span class="str"&gt;"this is a test"&lt;/span&gt;;
         String b = &lt;span class="str"&gt;"this is a camel"&lt;/span&gt;;
      
         &lt;span class="rem"&gt;// Generate the PropertyInfo object for the string as a Char array &lt;/span&gt;
         PropertyInfo pi = &lt;span class="kwrd"&gt;typeof&lt;/span&gt;(String).GetProperty(&lt;span class="str"&gt;"Chars"&lt;/span&gt;);
      
         &lt;span class="rem"&gt;// Test the tenth letter&lt;/span&gt;
         Assert.AreValueEqual(pi, a, b, &lt;span class="kwrd"&gt;new&lt;/span&gt; Object[] { 10 });
      }
   }
}&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Hopefully, this gives you a few ideas on how you might use Assert.AreValueEqual. MbUnit itself uses it in our DataAssert class, the source for which &lt;a href="http://www.koders.com/csharp/fid30A0B172C08973DB6270CD3E0E98923918C56900.aspx" target="_blank" rel="nofollow"&gt;you can see here&lt;/a&gt;. There's also &lt;a href="http://groups.google.com/group/MbUnitUser/browse_thread/thread/f2e55ea3998d9cad" target="_blank" rel="nofollow"&gt;a discussion on the MbUnit-User forum discussing this method&lt;/a&gt; and whether or not it should make it into MbUnit v3. If you'd like to see it stay, or would like to propose an alternative, &lt;a href="http://groups.google.com/group/MbUnitUser/browse_thread/thread/f2e55ea3998d9cad" target="_blank" rel="nofollow"&gt;reply to the thread&lt;/a&gt;.&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7fcdb451-6efb-45e5-b059-1acebdd1c49c" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/mbunit" rel="tag"&gt;mbunit&lt;/a&gt;,&lt;a href="http://technorati.com/tags/gallio" rel="tag"&gt;gallio&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ipona.com/dan/aggbug/8512.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=aiYKjJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=aiYKjJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DansArchive?a=73NmQJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/DansArchive?i=73NmQJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
            <dc:creator>Dan Maharry</dc:creator>
            <guid isPermaLink="false">http://blogs.ipona.com/dan/archive/2008/07/21/Assert.AreValueEqual.aspx</guid>
            <pubDate>Mon, 21 Jul 2008 21:13:25 GMT</pubDate>
            <wfw:comment>http://blogs.ipona.com/dan/comments/8512.aspx</wfw:comment>
            <comments>http://blogs.ipona.com/dan/archive/2008/07/21/Assert.AreValueEqual.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://blogs.ipona.com/dan/comments/commentRss/8512.aspx</wfw:commentRss>
        <feedburner:origLink>http://blogs.ipona.com/dan/archive/2008/07/21/Assert.AreValueEqual.aspx</feedburner:origLink></item>
    <lastBuildDate>Wed, 08 Oct 2008 00:00:00 -0500</lastBuildDate></channel>
</rss>
