<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.pluralsight.com/community/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Onion Blog - All Comments</title><link>http://www.pluralsight.com/community/blogs/fritz/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>re: Beware the siren of yield return</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2008/02/06/50166.aspx#68713</link><pubDate>Tue, 30 Jun 2009 17:10:52 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:68713</guid><dc:creator>James</dc:creator><description>&lt;p&gt;Good question, Andy. &amp;nbsp;I just did a quick test and it looks like using yield return takes about 50% longer than allocating a new array. &amp;nbsp;However, both approaches are really very fast, so I suspect in most cases the performance hit will really be minimal.&lt;/p&gt;
&lt;p&gt;I personally feel that yield return and allocating an array are equally readable, so if you have a small, fixed number of items and you know that the consuming program will want to iterate through all of them, you&amp;#39;re probably better off creating an array for them. &amp;nbsp;If you&amp;#39;re running through a loop to create all the elements that you iterate across, you might consider using yield return. &amp;nbsp;This not only allows you to avoid the memory overhead of a gigantic array, but also makes it so that if your consumer breaks out of the loop part-way through, you don&amp;#39;t have to produce all the elements that never get used.&lt;/p&gt;
&lt;p&gt;So, like most of the syntactic sugar in .NET, yield return can be extremely useful if you know when to use it, and when not to.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=68713" width="1" height="1"&gt;</description></item><item><title>re: Complex data binding expressions in ASP.NET</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2005/12/16/17507.aspx#68154</link><pubDate>Fri, 26 Jun 2009 18:21:53 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:68154</guid><dc:creator>R Dawson</dc:creator><description>&lt;p&gt;Thank you so much for the code example. It helped me get around a divide by zero error I would occasionally get.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=68154" width="1" height="1"&gt;</description></item><item><title>re: Adding client confirmation to a GridView delete</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2006/03/22/20514.aspx#66837</link><pubDate>Thu, 18 Jun 2009 13:15:43 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:66837</guid><dc:creator>Henry Senior</dc:creator><description>&lt;p&gt;I didn&amp;#39;t want to use a templated control cos I also want to use &lt;/p&gt;
&lt;p&gt;EnableSortingAndPagingCallbacks=&amp;quot;true&amp;quot; and these two are incompatible.&lt;/p&gt;
&lt;p&gt;this is my solution to trap the click event at gridview/table level and see if the event&amp;#39;s source element is correct.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var gridView = document.getElementById(&amp;#39;&amp;lt;%=gvCompanies.ClientID%&amp;gt;&amp;#39;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;gridView.onclick = function(e) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var returnValue = true;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var clickElement = (window.event) ? event.srcElement : e.target;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (clickElement.tagName.toString().toLowerCase() == &amp;#39;a&amp;#39;) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (clickElement.innerHTML.match(/delete/i)) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;returnValue = confirm(&amp;#39;Delete?&amp;#39;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return returnValue;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=66837" width="1" height="1"&gt;</description></item><item><title>re: Word count in office 2007</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2006/06/07/26924.aspx#66179</link><pubDate>Sat, 13 Jun 2009 06:28:56 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:66179</guid><dc:creator>Bhakti</dc:creator><description>&lt;p&gt;Thank you so much!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=66179" width="1" height="1"&gt;</description></item><item><title>Microsoft DevDays 2009</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2009/05/28/demos-for-asp-net-ajax-4-0-talk-at-devdays-2009-in-the-hague.aspx#65910</link><pubDate>Thu, 11 Jun 2009 09:40:03 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:65910</guid><dc:creator>Peter Kassenaar</dc:creator><description>&lt;p&gt;Microsoft DevDays 2009&lt;/p&gt;
&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=65910" width="1" height="1"&gt;</description></item><item><title>re: Creating JSON-enabled WCF services in .NET 3.5</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2008/01/31/50121.aspx#65831</link><pubDate>Mon, 08 Jun 2009 17:10:49 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:65831</guid><dc:creator>Sachin - Submit articles</dc:creator><description>&lt;p&gt;Very nice post.I am not sure how to implement security. Also it did not work too well in firefox and in a multiclient/multi domain environment. An real attached sample project would have very helpful though. I am still a novice to the jquery, json and WCF technologies, I will follow your articles in future. &amp;nbsp;THanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=65831" width="1" height="1"&gt;</description></item><item><title>re: Using statement in VB.NET 2.0</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2005/04/28/7834.aspx#65219</link><pubDate>Wed, 03 Jun 2009 13:56:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:65219</guid><dc:creator>Arcadian</dc:creator><description>&lt;p&gt;Sorry Foo, missed your comment previously - didn&amp;#39;t show up until after I reloaded the page.&lt;/p&gt;
&lt;p&gt;However the question still remains - doesn&amp;#39;t the connection using block serve to close the connection? Why not re-use when possible? &lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=65219" width="1" height="1"&gt;</description></item><item><title>re: Using statement in VB.NET 2.0</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2005/04/28/7834.aspx#65216</link><pubDate>Wed, 03 Jun 2009 13:24:33 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:65216</guid><dc:creator>Arcadian</dc:creator><description>&lt;p&gt;Ok, no answers so far... but why open connection inside the command using block? Why not have multiple commands be able to access the same connection? Does not the connection close when the connection using block is ended?&lt;/p&gt;
&lt;p&gt;Any help? &amp;nbsp;Thanks!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=65216" width="1" height="1"&gt;</description></item><item><title>re: Using statement in VB.NET 2.0</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2005/04/28/7834.aspx#65153</link><pubDate>Wed, 03 Jun 2009 01:23:02 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:65153</guid><dc:creator>Foo</dc:creator><description>&lt;p&gt;Probably because that&amp;#39;s the typical way to do it in C# -- stack the usings and open inside the last scope.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=65153" width="1" height="1"&gt;</description></item><item><title>re: Demos for ASP.NET AJAX 4.0 talk at DevDays 2009 in The Hague</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2009/05/28/demos-for-asp-net-ajax-4-0-talk-at-devdays-2009-in-the-hague.aspx#64161</link><pubDate>Sat, 30 May 2009 20:04:50 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:64161</guid><dc:creator>Peter Kassenaar</dc:creator><description>&lt;p&gt;Hi Fritz,&lt;/p&gt;
&lt;p&gt;thanks for the talks at DevDays &amp;#39;09. I was one of the attendees and enjoyed every minute of the ASP.NET AJAX 4.0-talk.&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;best wishes&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=64161" width="1" height="1"&gt;</description></item><item><title>re: Demos for Silverlight 2 Controls and ASP.NET MVC talks at DevDays 2009</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2009/05/29/demos-for-silverlight-2-controls-and-asp-net-mvc-talks-at-devdays-2009.aspx#64019</link><pubDate>Fri, 29 May 2009 21:07:53 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:64019</guid><dc:creator>paul van genuchten</dc:creator><description>&lt;p&gt;hi fritz, i really enjoyed listening to your story on mvc today. I was kind of surprized some guys hadn&amp;#39;t even heard of the term, before entering the room. For me, i&amp;#39;ve used mvc in a java environment. And later learned about the &amp;#39;web-forms&amp;#39;. I&amp;#39;m glad i can leave that behind me...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=64019" width="1" height="1"&gt;</description></item><item><title>re: Creating JSON-enabled WCF services in .NET 3.5 – an even simpler approach</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2008/02/01/50126.aspx#63838</link><pubDate>Thu, 28 May 2009 17:59:55 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:63838</guid><dc:creator>Stuart</dc:creator><description>&lt;p&gt;To fix the [&amp;quot;WeatherService&amp;quot; is undefined] error:&lt;/p&gt;
&lt;p&gt;- right-click the website in your IIS manager and choose &amp;quot;properties&amp;quot;. Then click the &amp;quot;Directory&amp;quot; tab, click the &amp;quot;Edit&amp;quot; button in the Anonymous access and authentication control&amp;quot; area. You will see that both Anonymous access and Integrated Windows Authentication are selected. Unselect one of them, then restart IIS. After that, the application should work smoothly. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=63838" width="1" height="1"&gt;</description></item><item><title>re: Word count in office 2007</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2006/06/07/26924.aspx#63700</link><pubDate>Wed, 27 May 2009 06:57:59 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:63700</guid><dc:creator>Sandra</dc:creator><description>&lt;p&gt;I didn&amp;#39;t even bother trying to find it, so I googled. Thank God for Google and the wonderful people who post their knowledge!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=63700" width="1" height="1"&gt;</description></item><item><title>re: Word count in office 2007</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2006/06/07/26924.aspx#63392</link><pubDate>Mon, 25 May 2009 00:07:00 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:63392</guid><dc:creator>anon.</dc:creator><description>&lt;p&gt;hey thanks so much for this lol i was looking for word count on the top of the page...&lt;/p&gt;
&lt;p&gt;thanks a lot!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=63392" width="1" height="1"&gt;</description></item><item><title>re: Using ResolveClientUrl in markup</title><link>http://www.pluralsight.com/community/blogs/fritz/archive/2006/02/06/18596.aspx#63121</link><pubDate>Thu, 21 May 2009 03:24:32 GMT</pubDate><guid isPermaLink="false">d057c89c-07b5-4bfb-b52f-d79d1e3ece89:63121</guid><dc:creator>shenghuo.cn</dc:creator><description>&lt;p&gt;i agree with you ! the Request.ApplicationPath is clean and fast to solve the problem&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=63121" width="1" height="1"&gt;</description></item></channel></rss>