<?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: RenderPartial to String in ASP.NET MVC Beta</title>
	<atom:link href="http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/</link>
	<description></description>
	<lastBuildDate>Wed, 19 May 2010 19:42:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kevin</title>
		<link>http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/comment-page-1/#comment-1005</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Tue, 13 Oct 2009 00:35:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightmix.com//2008/11/24/how-to-renderpartial-to-string-in-asp-net-mvc#comment-1005</guid>
		<description>Hello all, I&#039;ve updated this post to link to a new article, which makes renderpartial to string substantially easier in ASP.NET MVC</description>
		<content:encoded><![CDATA[<p>Hello all, I&#8217;ve updated this post to link to a new article, which makes renderpartial to string substantially easier in ASP.NET MVC</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Atkinson</title>
		<link>http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/comment-page-1/#comment-962</link>
		<dc:creator>Dan Atkinson</dc:creator>
		<pubDate>Fri, 07 Aug 2009 08:26:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightmix.com//2008/11/24/how-to-renderpartial-to-string-in-asp-net-mvc#comment-962</guid>
		<description>Lorenz,

If you look up at the comment on January 28th, you&#039;ll see that I mentioned this. :)

Thanks,

Dan (the guy who originally created the SO question!).</description>
		<content:encoded><![CDATA[<p>Lorenz,</p>
<p>If you look up at the comment on January 28th, you&#8217;ll see that I mentioned this. <img src='http://www.brightmix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks,</p>
<p>Dan (the guy who originally created the SO question!).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lorenz Cuno Klopfenstein</title>
		<link>http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/comment-page-1/#comment-961</link>
		<dc:creator>Lorenz Cuno Klopfenstein</dc:creator>
		<pubDate>Thu, 06 Aug 2009 20:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightmix.com//2008/11/24/how-to-renderpartial-to-string-in-asp-net-mvc#comment-961</guid>
		<description>Hello people,
I found a new solution that doesn&#039;t involve messing with the filters of the current HttpResponse and shouldn&#039;t have problems with ContentType and other headers (it isn&#039;t quite as elegant as Martin&#039;s solution, but it also works for views that inherit from ViewPage instead of UserControls only).
Here it is on StackOverflow: http://stackoverflow.com/questions/483091/render-a-view-as-a-string/1241257#1241257

Hope it helps. :) Greetings</description>
		<content:encoded><![CDATA[<p>Hello people,<br />
I found a new solution that doesn&#8217;t involve messing with the filters of the current HttpResponse and shouldn&#8217;t have problems with ContentType and other headers (it isn&#8217;t quite as elegant as Martin&#8217;s solution, but it also works for views that inherit from ViewPage instead of UserControls only).<br />
Here it is on StackOverflow: <a href="http://stackoverflow.com/questions/483091/render-a-view-as-a-string/1241257#1241257" rel="nofollow">http://stackoverflow.com/questions/483091/render-a-view-as-a-string/1241257#1241257</a></p>
<p>Hope it helps. <img src='http://www.brightmix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Greetings</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/comment-page-1/#comment-849</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Wed, 17 Jun 2009 21:37:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightmix.com//2008/11/24/how-to-renderpartial-to-string-in-asp-net-mvc#comment-849</guid>
		<description>Jon Kruger: My approach doenst have any problems with content-type.

Anyway, i just wanted to add that nesting the custom render partial works just fine (i use it for a email template service).

If you need to make the helpers work (html/ajax/url) remember to call InitHelpers() on the ViewPage (and add ViewContext / ControllerContext).</description>
		<content:encoded><![CDATA[<p>Jon Kruger: My approach doenst have any problems with content-type.</p>
<p>Anyway, i just wanted to add that nesting the custom render partial works just fine (i use it for a email template service).</p>
<p>If you need to make the helpers work (html/ajax/url) remember to call InitHelpers() on the ViewPage (and add ViewContext / ControllerContext).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Kruger</title>
		<link>http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/comment-page-1/#comment-846</link>
		<dc:creator>Jon Kruger</dc:creator>
		<pubDate>Sun, 07 Jun 2009 02:59:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightmix.com//2008/11/24/how-to-renderpartial-to-string-in-asp-net-mvc#comment-846</guid>
		<description>I think I found a way around the limitation where you can&#039;t change the content type.  It seems to be working for me so far.

&lt;a href=&quot;http://jonkruger.com/blog/2009/06/06/aspnet-mvc-rendering-a-partial-view-to-a-string/&quot; rel=&quot;nofollow&quot;&gt;
http://jonkruger.com/blog/2009/06/06/aspnet-mvc-rendering-a-partial-view-to-a-string/&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I think I found a way around the limitation where you can&#8217;t change the content type.  It seems to be working for me so far.</p>
<p><a href="http://jonkruger.com/blog/2009/06/06/aspnet-mvc-rendering-a-partial-view-to-a-string/" rel="nofollow"><br />
</a><a href="http://jonkruger.com/blog/2009/06/06/aspnet-mvc-rendering-a-partial-view-to-a-string/" rel="nofollow">http://jonkruger.com/blog/2009/06/06/aspnet-mvc-rendering-a-partial-view-to-a-string/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/comment-page-1/#comment-842</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Tue, 26 May 2009 15:42:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightmix.com//2008/11/24/how-to-renderpartial-to-string-in-asp-net-mvc#comment-842</guid>
		<description>Thank You,Thank You,Thank You! This is exactly what I needed. I am returning a JSONResult now with the output from my Partial!</description>
		<content:encoded><![CDATA[<p>Thank You,Thank You,Thank You! This is exactly what I needed. I am returning a JSONResult now with the output from my Partial!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maico Tamayo</title>
		<link>http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/comment-page-1/#comment-835</link>
		<dc:creator>Maico Tamayo</dc:creator>
		<pubDate>Mon, 11 May 2009 16:10:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightmix.com//2008/11/24/how-to-renderpartial-to-string-in-asp-net-mvc#comment-835</guid>
		<description>To Ozkan,  
 Sorry for my late reply, I was so busy with my work, we also experienced that same problem when our company migrated from mvc beta to 1.0, and we found out to prevent this error, you must really but viewData or at least instantiate it properly for your RenderPartialString method, I don&#039;t know your situation, but in our case it worked.. It seems working, maybe the MVC team is a little strict nowadays when it comes to rendering a page with a null viewdata,I really don&#039;t know.But I hope this helps you.</description>
		<content:encoded><![CDATA[<p>To Ozkan,<br />
 Sorry for my late reply, I was so busy with my work, we also experienced that same problem when our company migrated from mvc beta to 1.0, and we found out to prevent this error, you must really but viewData or at least instantiate it properly for your RenderPartialString method, I don&#8217;t know your situation, but in our case it worked.. It seems working, maybe the MVC team is a little strict nowadays when it comes to rendering a page with a null viewdata,I really don&#8217;t know.But I hope this helps you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miha Markic</title>
		<link>http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/comment-page-1/#comment-831</link>
		<dc:creator>Miha Markic</dc:creator>
		<pubDate>Fri, 01 May 2009 10:50:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightmix.com//2008/11/24/how-to-renderpartial-to-string-in-asp-net-mvc#comment-831</guid>
		<description>@Martin: Right, I&#039;ve already added that and that part works. Unfortunatelly I&#039;ve immediately got another showstopper - nested renderpartials won&#039;t work (if you &quot;rendered to string&quot; control calls another renderpartial).</description>
		<content:encoded><![CDATA[<p>@Martin: Right, I&#8217;ve already added that and that part works. Unfortunatelly I&#8217;ve immediately got another showstopper &#8211; nested renderpartials won&#8217;t work (if you &#8220;rendered to string&#8221; control calls another renderpartial).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/comment-page-1/#comment-830</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Fri, 01 May 2009 10:48:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightmix.com//2008/11/24/how-to-renderpartial-to-string-in-asp-net-mvc#comment-830</guid>
		<description>@Mika Markic: You just have to add the ViewContext to your ViewPage. I guess you are probably using the HtmlHelpers which needs the ViewContext to be set.

Look at my post (in the comments) for an example of an extension method that probably does what you want.</description>
		<content:encoded><![CDATA[<p>@Mika Markic: You just have to add the ViewContext to your ViewPage. I guess you are probably using the HtmlHelpers which needs the ViewContext to be set.</p>
<p>Look at my post (in the comments) for an example of an extension method that probably does what you want.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Miha Markic</title>
		<link>http://www.brightmix.com/blog/how-to-renderpartial-to-string-in-asp-net-mvc/comment-page-1/#comment-829</link>
		<dc:creator>Miha Markic</dc:creator>
		<pubDate>Thu, 30 Apr 2009 08:59:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightmix.com//2008/11/24/how-to-renderpartial-to-string-in-asp-net-mvc#comment-829</guid>
		<description>@Martin: I get viewContext null exception with your approach. I guess viewContext should be set, but you are not setting it.</description>
		<content:encoded><![CDATA[<p>@Martin: I get viewContext null exception with your approach. I guess viewContext should be set, but you are not setting it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 3.719 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-06-11 00:57:23 -->
