ASP.NET MVC Beta Released
page 7 of 14
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 9870/ 259

Strongly Typed [AcceptVerbs] attribute

ASP.NET MVC Preview 5 introduced a new [AcceptVerbs] attribute that you could use to indicate which HTTP verbs an action method supported. 

In preview 5 you always specified verbs using strings.  We still support this with the beta, but have also added support for common verbs to be specified using a strongly-typed enum mask.  For example:

Figure 19

Today's beta release also no longer requires that you specify [AcceptVerbs] on both actions in scenarios like above.  By default ASP.NET MVC now looks for an action method that explicitly supports the incoming http verb - and if one is not found will use the action method that doesn't have an explicit verb specified.  This saves some typing for common GET/POST scenarios (you no longer need to decorate the GET method).


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 7 and 7 and type the answer here:

User Comments

Title: ASP.NET MVC   
Name: Ranganathan
Date: 2/9/2009 1:54:22 AM
Comment:
Today's beta release is a step closer to the final ASP.NET MVC 1.0 product. While not 100% feature complete, we think the major subsystems are all getting really close to being done, and that the quality level is now pretty good.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 11/20/2009 8:13:16 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search