Skip to content

Tag Archives: asp.net

Correct Behaviour of UpdateModel in ASP.NET MVC

06-Aug-09

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 [...]

ASP.NET MVC Validation Refresh: Best Techniques & Frameworks

25-Jun-09

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 [...]

Professional ASP.NET MVC 1.0 Book Released!

30-Apr-09

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 [...]

ASP.NET MVC Released As Open Source under MS-PL License

03-Apr-09

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 [...]

Using MetadataType attribute with ASP.NET MVC xVal Validation Framework

04-Mar-09

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 [...]

ASP.NET MVC Release Candidate Now Available

28-Jan-09

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.

ASP.NET MVC Validation – The Definitive Guide (in my eyes)

19-Jan-09

Please see my newer article here.

Lowercase Route URL's in ASP.NET MVC

19-Dec-08

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 [...]

Best. Post. Ever.

15-Dec-08

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!

Ajax.BeginForm pass action method parameter

11-Dec-08

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 [...]

My name is Graham O'Neale and I'm a software architect from Gold Coast, Australia. I am an overtime thinker, full time coder and awake part time in the real world. I have a keen interest in software development, particularly in the realm of programming (C#, ASP.NET, ASP.NET MVC, LINQ (2 SQL), Entity Framework, Silverlight, Blend, WCF, WPF) and a keen interest in the cutting edge and innovation. I have a new found love for design patterns, ALT.NET practices and well crafted software architecture. The purpose of this blog is to express any thoughts, findings, tips and gripes along my travels in the wonderful world of coding and technology...