Hi guys, I posted this question on stackoverflow.com today, feel free to join in and post if you have any thoughts on the topic.
I am interested to know what you guys feel should be deemed “correct behaviour” in terms of the UpdateModel method in ASP.NET MVC.
The reason I ask here is perhaps if this functionality [...]
I just wanted to do a “refresher” post regarding ASP.NET MVC validation as many things have changed over the last couple of months and there is a lot of information out there. I wanted to aggregate my known validation options and recommend them in one tabular list. Whilst I’m scared to write “best practice” now [...]
The long anticipated ASP.NET MVC book entitled “Professional ASP.NET MVC 1.0” has just been released and available over at Amazon.com right now. Published by Wrox and content put together by some of our greatest names in the .NET community, Scott Guthrie, Rob Conery, Scott Hanselman and Phil Haack.
I also published in a previous post regarding [...]
Scott Gu has announced that Microsoft is open sourcing the ASP.NET MVC Framework to be released under the Microsoft Public License (MS-PL). Very cool. As quoted “The MS-PL contains no platform restrictions and provides broad rights to modify and redistribute the source code.”.
http://tech.slashdot.org/article.pl?sid=09/04/02/1845214
I’ve linked to Slashdot.org rather than directly to Scott Gu’s post [...]
Well some updates to my old article on ASP.NET MVC Validation today.
The bad news, I had to drop “Solution B” which was to allow you to define validation rules on a metadata type “buddy” class of your model, in cases where you may be using something like LINQ2SQL and are unable to make changes to [...]
The Release Candidate of ASP.NET MVC 1.0 has just been released, you can read about it on these two important blogs:
http://haacked.com/archive/2009/01/27/aspnetmvc-release-candidate.aspx
http://weblogs.asp.net/scottgu/archive/2009/01/27/asp-net-mvc-1-0-release-candidate-now-available.aspx
Release Notes: http://go.microsoft.com/fwlink/?LinkID=137661&clcid=0×409
Horray! Lots of delicious new stuff.
Please see my newer article here.
For anybody interesting in having ruby on rails style routes; or follow a lowercase URL pattern (mysite.com/member/profile/goneale) which most web 2.0 sites seem to be following, check out the below code cited and enhanced from this article (http://www.makiwa.com/index.php/2008/05/31/lowercase-mvc-route-urls/).
Firstly you will need a RouteExtensions.cs file, or named anything you like with the following (compatible as at [...]
MAJOR thanks to Phil Haack for sharing information on ASP.NET MVC complex model binding.
Perfect if you ever need mass form field / or ‘grid-style’ updating by posting to an IList instead of just singular.
Check it out today!
http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx
THANK YOU PHIL! THANK YOU!
If you have looked at the Ajax.BeginForm() method on ASP.NET MVC Beta 1 you will notice there is no way to specify input parameters to your action as you could do with the lambda extension method Html.BeginForm with Futures.
This is how I got around it:
[sourcecode language='html']
…
My action method accepting “typeId”:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Add(int? typeId, [Bind(Prefix [...]