<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Boost ASP.NET performance with deferred content loading</title>
	<atom:link href="http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/feed/" rel="self" type="application/rss+xml" />
	<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/</link>
	<description>ASP.NET and AJAX code, ideas, and examples.</description>
	<lastBuildDate>Thu, 02 Feb 2012 19:50:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Dousin</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-53910</link>
		<dc:creator>Dousin</dc:creator>
		<pubDate>Thu, 15 Dec 2011 00:04:31 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-53910</guid>
		<description>Great and helpfull posting for me. A pitty, that I haven&#039;t found it earliert. It would save me plenty of time. I find also other postings in your blog very helpfull. Thx</description>
		<content:encoded><![CDATA[<p>Great and helpfull posting for me. A pitty, that I haven&#8217;t found it earliert. It would save me plenty of time. I find also other postings in your blog very helpfull. Thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TK</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-45064</link>
		<dc:creator>TK</dc:creator>
		<pubDate>Fri, 26 Aug 2011 15:32:47 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-45064</guid>
		<description>I&#039;m getting 
Error executing child request for handler &#039;System.Web.UI.Page&#039;

My user control contains Ajax Accordion.

What am I doing wrong.

Thanks</description>
		<content:encoded><![CDATA[<p>I&#8217;m getting<br />
Error executing child request for handler &#8216;System.Web.UI.Page&#8217;</p>
<p>My user control contains Ajax Accordion.</p>
<p>What am I doing wrong.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Enable delayed content loading for Cuyahoga Module &#124; 老屋前的苦楝树</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-41669</link>
		<dc:creator>Enable delayed content loading for Cuyahoga Module &#124; 老屋前的苦楝树</dc:creator>
		<pubDate>Sun, 09 Jan 2011 08:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-41669</guid>
		<description>[...] See my previous post to get understand how to realize delayed content loading. For English original article, see here. [...]</description>
		<content:encoded><![CDATA[<p>[...] See my previous post to get understand how to realize delayed content loading. For English original article, see here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guillermo Guerini</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-40228</link>
		<dc:creator>Guillermo Guerini</dc:creator>
		<pubDate>Fri, 29 Oct 2010 11:53:11 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-40228</guid>
		<description>Thanks Dave for your response!! I&#039;ll take a look at the HttpHandler option. Someone told me that it could be a better option. So, depending on the situation I stick with one of the three options. About the IE6, I&#039;m developing a solution for my client&#039;s intranet so I have no option. Unfortunately. But I already know they are starting to adopt iPhones and Ipads as well... so hopefully we will soon move forward and leave the crap IE 6 behind. Thanks again for your support.</description>
		<content:encoded><![CDATA[<p>Thanks Dave for your response!! I&#8217;ll take a look at the HttpHandler option. Someone told me that it could be a better option. So, depending on the situation I stick with one of the three options. About the IE6, I&#8217;m developing a solution for my client&#8217;s intranet so I have no option. Unfortunately. But I already know they are starting to adopt iPhones and Ipads as well&#8230; so hopefully we will soon move forward and leave the crap IE 6 behind. Thanks again for your support.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-40179</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Tue, 26 Oct 2010 19:13:50 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-40179</guid>
		<description>As far as I know, there&#039;s no significant performance difference between a WebMethod defined in an external service and one defined inline as a Page Method.  Really, an HttpHandler would be slightly faster than either.  When you aren&#039;t taking advantage of the ScriptService&#039;s JSON handling, an HttpHandler probably makes more sense.  In retrospect, I think I should have used one of those in this example.

There are definitely pros and cons to both approaches to rendering. In modern browsers, rendering JSON via a client-side template is definitely faster and is lighter on the wire, but I think your IE6 point is a good one in favor of server-side rendering. On a public-facing site, it usually makes sense to use this partial rendering method for SEO-critical content, so you can use the same server-side rendering logic for both async clients &lt;em&gt;and&lt;/em&gt; JavaScript disabled spiders.</description>
		<content:encoded><![CDATA[<p>As far as I know, there&#8217;s no significant performance difference between a WebMethod defined in an external service and one defined inline as a Page Method.  Really, an HttpHandler would be slightly faster than either.  When you aren&#8217;t taking advantage of the ScriptService&#8217;s JSON handling, an HttpHandler probably makes more sense.  In retrospect, I think I should have used one of those in this example.</p>
<p>There are definitely pros and cons to both approaches to rendering. In modern browsers, rendering JSON via a client-side template is definitely faster and is lighter on the wire, but I think your IE6 point is a good one in favor of server-side rendering. On a public-facing site, it usually makes sense to use this partial rendering method for SEO-critical content, so you can use the same server-side rendering logic for both async clients <em>and</em> JavaScript disabled spiders.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guillermo Guerini</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-40175</link>
		<dc:creator>Guillermo Guerini</dc:creator>
		<pubDate>Tue, 26 Oct 2010 12:29:59 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-40175</guid>
		<description>Hi Dave, I&#039;ve been using this solution with jQuery and it works incredibly well. I have a Repeater working as a &quot;simple&quot; GridView and to paginate the results my jQuery script access the WebMethod the &quot;renders&quot; the UserControl with the Repeater. I could simply return a json list and append this to my page instead of rendering the UC, but considering that my client uses IE6 still (blah!), I&#039;m trying to avoid the use of heavy javascript in the client. My question is: is there any performance difference between WebMethods and WebServices? And is this still a good approach (render the UC via webservices/webmethods) or you recommend something better? Thanks very much!! And your website is one of the best .NET websites I know.</description>
		<content:encoded><![CDATA[<p>Hi Dave, I&#8217;ve been using this solution with jQuery and it works incredibly well. I have a Repeater working as a &#8220;simple&#8221; GridView and to paginate the results my jQuery script access the WebMethod the &#8220;renders&#8221; the UserControl with the Repeater. I could simply return a json list and append this to my page instead of rendering the UC, but considering that my client uses IE6 still (blah!), I&#8217;m trying to avoid the use of heavy javascript in the client. My question is: is there any performance difference between WebMethods and WebServices? And is this still a good approach (render the UC via webservices/webmethods) or you recommend something better? Thanks very much!! And your website is one of the best .NET websites I know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hector</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-39965</link>
		<dc:creator>Hector</dc:creator>
		<pubDate>Mon, 27 Sep 2010 19:42:32 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-39965</guid>
		<description>I implemented something similar to this, but I am having ViewState problems. My controls is a little different though. I have a controls that collects data from the user. This control is repeated N-times according to the user&#039;s request (a sort of repeater of controls). Then I query the control collecting all the data and sending it back to the server. 
My problem is that when I try to submit the data I am getting an Invalid ViewState exception.
Any ideas?

_hector</description>
		<content:encoded><![CDATA[<p>I implemented something similar to this, but I am having ViewState problems. My controls is a little different though. I have a controls that collects data from the user. This control is repeated N-times according to the user&#8217;s request (a sort of repeater of controls). Then I query the control collecting all the data and sending it back to the server.<br />
My problem is that when I try to submit the data I am getting an Invalid ViewState exception.<br />
Any ideas?</p>
<p>_hector</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-39891</link>
		<dc:creator>Marko</dc:creator>
		<pubDate>Tue, 21 Sep 2010 14:07:34 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-39891</guid>
		<description>hmm, must be problem with loading of RadGrid then...style is not applied to grid and I have some strange issues in firefox: RadGridNamespace is not defined

Anyone has similar issues?</description>
		<content:encoded><![CDATA[<p>hmm, must be problem with loading of RadGrid then&#8230;style is not applied to grid and I have some strange issues in firefox: RadGridNamespace is not defined</p>
<p>Anyone has similar issues?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-39890</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Tue, 21 Sep 2010 13:45:03 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-39890</guid>
		<description>The empty page that you use to load the user control doesn&#039;t affect styling. When you inject the rendered HTML into the &quot;host&quot; page, its styles will automatically apply to the content you&#039;ve added. If your page&#039;s styles aren&#039;t applying as you intended, your CSS selectors may be unintentionally too specific and excluding the injected content.  I&#039;d take a look with Firebug.</description>
		<content:encoded><![CDATA[<p>The empty page that you use to load the user control doesn&#8217;t affect styling. When you inject the rendered HTML into the &#8220;host&#8221; page, its styles will automatically apply to the content you&#8217;ve added. If your page&#8217;s styles aren&#8217;t applying as you intended, your CSS selectors may be unintentionally too specific and excluding the injected content.  I&#8217;d take a look with Firebug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-39889</link>
		<dc:creator>Marko</dc:creator>
		<pubDate>Tue, 21 Sep 2010 13:32:52 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-39889</guid>
		<description>One question for you Dave...how are you managing styling of async loaded controls. My async loaded grids doesn&#039;t have style applied because they are added to the empty page, it doesn&#039;t matter that I append them to the page that have that styles loaded for me.</description>
		<content:encoded><![CDATA[<p>One question for you Dave&#8230;how are you managing styling of async loaded controls. My async loaded grids doesn&#8217;t have style applied because they are added to the empty page, it doesn&#8217;t matter that I append them to the page that have that styles loaded for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-39870</link>
		<dc:creator>Marko</dc:creator>
		<pubDate>Fri, 17 Sep 2010 16:02:36 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-39870</guid>
		<description>As David said, it is read-only technique. I found it better approach in scenario where you have dynamic loading of user controls. In my case, user control was grid that is dynamically loaded into the page on some cases. It causes me lots of problems, because if you want to catch events from that user control, you need it to initialize that control in Page_Init, which in some cases is not so simple.

I found out that it is much simpler and elegant to have asynchronous loading of that control on each action in the control,  instead of loading control from code behind with LoadControl and then get big pain trying to wire up all things you need to in order to make it works .
 
Cheers
Marko</description>
		<content:encoded><![CDATA[<p>As David said, it is read-only technique. I found it better approach in scenario where you have dynamic loading of user controls. In my case, user control was grid that is dynamically loaded into the page on some cases. It causes me lots of problems, because if you want to catch events from that user control, you need it to initialize that control in Page_Init, which in some cases is not so simple.</p>
<p>I found out that it is much simpler and elegant to have asynchronous loading of that control on each action in the control,  instead of loading control from code behind with LoadControl and then get big pain trying to wire up all things you need to in order to make it works .</p>
<p>Cheers<br />
Marko</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-39869</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Fri, 17 Sep 2010 14:50:51 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-39869</guid>
		<description>That&#039;s the expected behavior. This is basically a read-only technique.</description>
		<content:encoded><![CDATA[<p>That&#8217;s the expected behavior. This is basically a read-only technique.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hector</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-39868</link>
		<dc:creator>Hector</dc:creator>
		<pubDate>Fri, 17 Sep 2010 14:01:48 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-39868</guid>
		<description>I am trying to make this work and it seems I am losing events.
I am iterating through a list of IDs and based on each of these IDs I am loading a UserControl. Everything loads fine except that only the first of these controls is retaining events. I can&#039;t event fire up a simple alert message from these controls.
Below is my code. I&#039;d appreciate the help here:

public string GetBenefitControls(string benefitIds, string contactId)
{
	// build list of benefit IDs from input
	List benefitIdList = new List();
	foreach (string item in benefitIds.Split(new string[] {&quot;&#124;&quot;}, StringSplitOptions.RemoveEmptyEntries))
	{
		int benefitId;
		if (int.TryParse(item, out benefitId))
			benefitIdList.Add(benefitId);
	}

	// build list of benefit objects from each id
	List benefitList = new List();
	foreach (int benefitId in benefitIdList)
	{
		benefitList.Add(new Benefit(benefitId));
	}

	// for each control, instantiate a BenefitAtIntake control and 
	// load this with a Benefit object
	StringBuilder benefitsAtintake = new StringBuilder();
	foreach (Benefit benefit in benefitList)
	{
		// create the page for the call
		Page page = new Page();
		page.EnableViewState = false;
		HtmlForm form = new HtmlForm();
		form.ID = &quot;__t&quot;;
		page.Controls.Add(form);

		// create the ClientIntakeBenefitDictionary dictionary for the benefit and add it to the BenefitAtIntake control
		ClientIntakeBenefitDictionary dictionary = new ClientIntakeBenefitDictionary(benefit, new Guid());
		Control control = page.LoadControl(&quot;~/UserControls/BenefitAtIntake.ascx&quot;);
		((BenefitAtIntake)control).Benefit = benefit;
		((BenefitAtIntake)control).IntakeBenefitCollection = dictionary[benefit];

		// create the HtmlForm for the page; and put the control in this new form
		form.Controls.Add(control);

		StringWriter writer = new StringWriter();
		HttpContext.Current.Server.Execute(page, writer, false);
		benefitsAtintake.AppendLine(writer.ToString());
		writer.Close();
	}
	return benefitsAtintake.ToString();
}

_Hector</description>
		<content:encoded><![CDATA[<p>I am trying to make this work and it seems I am losing events.<br />
I am iterating through a list of IDs and based on each of these IDs I am loading a UserControl. Everything loads fine except that only the first of these controls is retaining events. I can&#8217;t event fire up a simple alert message from these controls.<br />
Below is my code. I&#8217;d appreciate the help here:</p>
<p>public string GetBenefitControls(string benefitIds, string contactId)<br />
{<br />
	// build list of benefit IDs from input<br />
	List benefitIdList = new List();<br />
	foreach (string item in benefitIds.Split(new string[] {&#8220;|&#8221;}, StringSplitOptions.RemoveEmptyEntries))<br />
	{<br />
		int benefitId;<br />
		if (int.TryParse(item, out benefitId))<br />
			benefitIdList.Add(benefitId);<br />
	}</p>
<p>	// build list of benefit objects from each id<br />
	List benefitList = new List();<br />
	foreach (int benefitId in benefitIdList)<br />
	{<br />
		benefitList.Add(new Benefit(benefitId));<br />
	}</p>
<p>	// for each control, instantiate a BenefitAtIntake control and<br />
	// load this with a Benefit object<br />
	StringBuilder benefitsAtintake = new StringBuilder();<br />
	foreach (Benefit benefit in benefitList)<br />
	{<br />
		// create the page for the call<br />
		Page page = new Page();<br />
		page.EnableViewState = false;<br />
		HtmlForm form = new HtmlForm();<br />
		form.ID = &#8220;__t&#8221;;<br />
		page.Controls.Add(form);</p>
<p>		// create the ClientIntakeBenefitDictionary dictionary for the benefit and add it to the BenefitAtIntake control<br />
		ClientIntakeBenefitDictionary dictionary = new ClientIntakeBenefitDictionary(benefit, new Guid());<br />
		Control control = page.LoadControl(&#8220;~/UserControls/BenefitAtIntake.ascx&#8221;);<br />
		((BenefitAtIntake)control).Benefit = benefit;<br />
		((BenefitAtIntake)control).IntakeBenefitCollection = dictionary[benefit];</p>
<p>		// create the HtmlForm for the page; and put the control in this new form<br />
		form.Controls.Add(control);</p>
<p>		StringWriter writer = new StringWriter();<br />
		HttpContext.Current.Server.Execute(page, writer, false);<br />
		benefitsAtintake.AppendLine(writer.ToString());<br />
		writer.Close();<br />
	}<br />
	return benefitsAtintake.ToString();<br />
}</p>
<p>_Hector</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Feb 6th Links: ASP.NET, ASP.NET AJAX, Visual Studio, .NET, WPF &#124; OOP &#8211; Object Oriented Programing</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-38635</link>
		<dc:creator>Feb 6th Links: ASP.NET, ASP.NET AJAX, Visual Studio, .NET, WPF &#124; OOP &#8211; Object Oriented Programing</dc:creator>
		<pubDate>Tue, 04 May 2010 05:57:53 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-38635</guid>
		<description>[...] Boost ASP.NET Performance with Deferred Content Loading: Dave Ward continues his great articles on ASP.NET AJAX.&#160; This article talks about how you can improve the perceived load-time of a page by using an AJAX callback to retrieve HTML content once the page loads on the client.&#160; This approach is similar to the one I wrote about in my tip/trick post here. [...]</description>
		<content:encoded><![CDATA[<p>[...] Boost ASP.NET Performance with Deferred Content Loading: Dave Ward continues his great articles on ASP.NET AJAX.&#160; This article talks about how you can improve the perceived load-time of a page by using an AJAX callback to retrieve HTML content once the page loads on the client.&#160; This approach is similar to the one I wrote about in my tip/trick post here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/boost-aspnet-performance-with-deferred-content-loading/#comment-38427</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Sat, 10 Apr 2010 01:19:11 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/#comment-38427</guid>
		<description>This won&#039;t work well if you need the deferred content to raise postbacks. As mentioned in the article, the idea is to defer loading of ancillary content, not core features like WebForms forms.</description>
		<content:encoded><![CDATA[<p>This won&#8217;t work well if you need the deferred content to raise postbacks. As mentioned in the article, the idea is to defer loading of ancillary content, not core features like WebForms forms.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

