<?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: ASP.NET MVC re-factoring</title>
	<atom:link href="http://www.lazycoder.com/weblog/2008/07/30/aspnet-mvc-re-factoring/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lazycoder.com/weblog/2008/07/30/aspnet-mvc-re-factoring/</link>
	<description></description>
	<lastBuildDate>Sat, 13 Mar 2010 14:30:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Scott</title>
		<link>http://www.lazycoder.com/weblog/2008/07/30/aspnet-mvc-re-factoring/comment-page-1/#comment-180372</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Thu, 31 Jul 2008 21:18:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazycoder.com/weblog/?p=970#comment-180372</guid>
		<description>It still seems like there are two separate operations going on here, one with a POST context, and one with a GET context. Maybe two separate controller methods are needed?

But I see what they are doing there with the attribute.</description>
		<content:encoded><![CDATA[<p>It still seems like there are two separate operations going on here, one with a POST context, and one with a GET context. Maybe two separate controller methods are needed?</p>
<p>But I see what they are doing there with the attribute.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ASP.NET MVC Archived Blog Posts, Page 1</title>
		<link>http://www.lazycoder.com/weblog/2008/07/30/aspnet-mvc-re-factoring/comment-page-1/#comment-180341</link>
		<dc:creator>ASP.NET MVC Archived Blog Posts, Page 1</dc:creator>
		<pubDate>Thu, 31 Jul 2008 04:41:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazycoder.com/weblog/?p=970#comment-180341</guid>
		<description>[...] to VoteASP.NET MVC re-factoring (7/30/2008)Wednesday, July 30, 2008 from www.lazycoder.comI agree with his point and one of the MVC developers [...]</description>
		<content:encoded><![CDATA[<p>[...] to VoteASP.NET MVC re-factoring (7/30/2008)Wednesday, July 30, 2008 from <a href="http://www.lazycoder.comI" rel="nofollow">http://www.lazycoder.comI</a> agree with his point and one of the MVC developers [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Scheirman</title>
		<link>http://www.lazycoder.com/weblog/2008/07/30/aspnet-mvc-re-factoring/comment-page-1/#comment-180331</link>
		<dc:creator>Ben Scheirman</dc:creator>
		<pubDate>Wed, 30 Jul 2008 22:51:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazycoder.com/weblog/?p=970#comment-180331</guid>
		<description>Actually Scott, the reason they have that in there is so that the can dual purpose the action.

MVCContrib has an attribute called [PostOnly] which you&#039;d use on things like:

//usercontroller
[PostOnly]
public ActionResult Delete(int id)
{ 
   ....
}

to prevent someone from navigating to that url.

This attribute is now replaced by the frameworks [RequireHttpMethod(&quot;POST&quot;)] attribute.

The example you show allows them to have a single action, and if you POST to it you get different results.  I don&#039;t think I like it very much, but it&#039;s a pattern I&#039;ve seen a few places.</description>
		<content:encoded><![CDATA[<p>Actually Scott, the reason they have that in there is so that the can dual purpose the action.</p>
<p>MVCContrib has an attribute called [PostOnly] which you&#8217;d use on things like:</p>
<p>//usercontroller<br />
[PostOnly]<br />
public ActionResult Delete(int id)<br />
{<br />
   &#8230;.<br />
}</p>
<p>to prevent someone from navigating to that url.</p>
<p>This attribute is now replaced by the frameworks [RequireHttpMethod("POST")] attribute.</p>
<p>The example you show allows them to have a single action, and if you POST to it you get different results.  I don&#8217;t think I like it very much, but it&#8217;s a pattern I&#8217;ve seen a few places.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Stevens</title>
		<link>http://www.lazycoder.com/weblog/2008/07/30/aspnet-mvc-re-factoring/comment-page-1/#comment-180330</link>
		<dc:creator>Alan Stevens</dc:creator>
		<pubDate>Wed, 30 Jul 2008 22:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.lazycoder.com/weblog/?p=970#comment-180330</guid>
		<description>Scott,

In preview 4 there is a RequireHttpMethodAttribute in Microsoft.Web.Mvc.dll that removes the need for this code.

++Alan</description>
		<content:encoded><![CDATA[<p>Scott,</p>
<p>In preview 4 there is a RequireHttpMethodAttribute in Microsoft.Web.Mvc.dll that removes the need for this code.</p>
<p>++Alan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
