<?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: First impressions of RenderAction in MVC Preview 4</title>
	<atom:link href="http://mhinze.com/first-impressions-of-renderaction-in-mvc-preview-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://mhinze.com/first-impressions-of-renderaction-in-mvc-preview-4/</link>
	<description>Matt Hinze, learning in public</description>
	<lastBuildDate>Fri, 26 Feb 2010 17:28:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Matt</title>
		<link>http://mhinze.com/first-impressions-of-renderaction-in-mvc-preview-4/comment-page-1/#comment-52</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Fri, 18 Jul 2008 15:26:34 +0000</pubDate>
		<guid isPermaLink="false">http://mhinze.com/?p=48#comment-52</guid>
		<description>So in CodeCampServer it would be like this? (I do like the underscore naming convention for partials..)

public ActionResult List(string conferenceKey, bool partial, SponsorLevel? level)
{
	Conference conference = _conferenceRepository.GetConferenceByKey(conferenceKey);
	Sponsor[] sponsors = level.HasValue ? conference.GetSponsors(level.Value) : conference.GetSponsors();
	ViewData.Add(sponsors);
	if (partial) return View(&quot;_sponsors&quot;);
	return View();
}</description>
		<content:encoded><![CDATA[<p>So in CodeCampServer it would be like this? (I do like the underscore naming convention for partials..)</p>
<p>public ActionResult List(string conferenceKey, bool partial, SponsorLevel? level)<br />
{<br />
	Conference conference = _conferenceRepository.GetConferenceByKey(conferenceKey);<br />
	Sponsor[] sponsors = level.HasValue ? conference.GetSponsors(level.Value) : conference.GetSponsors();<br />
	ViewData.Add(sponsors);<br />
	if (partial) return View(&#8220;_sponsors&#8221;);<br />
	return View();<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Scheirman</title>
		<link>http://mhinze.com/first-impressions-of-renderaction-in-mvc-preview-4/comment-page-1/#comment-51</link>
		<dc:creator>Ben Scheirman</dc:creator>
		<pubDate>Fri, 18 Jul 2008 15:08:01 +0000</pubDate>
		<guid isPermaLink="false">http://mhinze.com/?p=48#comment-51</guid>
		<description>Why separate components from regular controllers?  It seems like what you need to do is call an action but render a specialized partial view... very similar to the ones we use when doing ajax calls.

Why not:

&lt;% Html.RenderAction(c=&gt;c.List(true /*partial */)); %&gt;

then your action can look like this:

public ActionResult List(bool partial)
{
     var sponsors = // load sponsors
     if(partial)
       return View(&quot;_sponsors&quot;, sponsors);

     ViewData[&quot;sponsors&quot;] = sponsors;
     return View();
}</description>
		<content:encoded><![CDATA[<p>Why separate components from regular controllers?  It seems like what you need to do is call an action but render a specialized partial view&#8230; very similar to the ones we use when doing ajax calls.</p>
<p>Why not:</p>
<p>&lt;% Html.RenderAction(c=&gt;c.List(true /*partial */)); %&gt;</p>
<p>then your action can look like this:</p>
<p>public ActionResult List(bool partial)<br />
{<br />
     var sponsors = // load sponsors<br />
     if(partial)<br />
       return View(&#8220;_sponsors&#8221;, sponsors);</p>
<p>     ViewData["sponsors"] = sponsors;<br />
     return View();<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zuhaib &#124; ASP.NET MVC Preview 4 Released</title>
		<link>http://mhinze.com/first-impressions-of-renderaction-in-mvc-preview-4/comment-page-1/#comment-50</link>
		<dc:creator>Zuhaib &#124; ASP.NET MVC Preview 4 Released</dc:creator>
		<pubDate>Fri, 18 Jul 2008 06:58:46 +0000</pubDate>
		<guid isPermaLink="false">http://mhinze.com/?p=48#comment-50</guid>
		<description>[...] First impressions on the new RenderAction method, again by Matt Hinze [...]</description>
		<content:encoded><![CDATA[<p>[...] First impressions on the new RenderAction method, again by Matt Hinze [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
