ASP.NET MVC Preview 5 Released

Release Notes

This ASP.NET MVC CodePlex Preview 5 is an interim release that contains some new features and some feature improvements for which the ASP.NET MVC team would like to receive feedback from the community. As always, feel free to provide feedback on the ASP.NET MVC forums.
Note: Before you run the ASP.NET MVC CodePlex Preview 5 installer, be sure to uninstall any earlier previews of ASP.NET MVC that you might have installed. In addition, close all instances of Visual Studio 2008.
The follwing issues are addressed in this release (see the Release Notes for more detail on any changes)

  • Html Helpers need to look into ModelState to get attempted value
  • Add a convenience overload for Html.ActionLink
  • Need friendly exception for UpdateModel type conversion errors.
  • UpdateModel needs to report a message when a property setter throws an exception

note: we are working on adding the source code for this release and expect it to be available shortly…


Here is interesting post on form validation with preview 5…


(this preview definitely breaks MVCContrib… So, I’ll be waiting for the MVCContrib to get updated before updating any of my projects)

 UPDATE: I was able to get ahold of the MVCContrib Preview 5 branch to get a build that works with preview 5.

Items that are ‘gotcha’s:  make sure you add the Microsoft.Web.Mvc assembly as well as add the namespace to the config…

  • “UpdateFrom” from BindingExpression has been replaced by UpdateModel
  • Html.TextArea, add an extra null at the end of the parameter list (for HTMLAttribs)
  • Html.Checkbox, the parameter list has changed, no ‘text’ parameter, which is good – I did notice the ‘BuildCheckBox’ function is gone – so on my ‘CheckBoxList’ helper, I build manually with the Html.CheckBox
  • this.ReadFromRequest… gone… Obviously they want you to use the whole UpdateModel, etc… so, what I did was create a ‘ReadFromRequest’ in my base class for my own use for now, it returns a string and takes a string – returning Request[key]
  • There is now a ‘LinkBuilder’ class in the Microsoft.Web.Mvc that replaces the BuildUrlFromExpression
  • RenderUserControl, etc… has been replaced with RenderPartial.  It basically is the same exact usage, however some gotchas:
    • This one does NOT return a string, it writes it directly – so no ‘=’, and add the semi-colon at the end.  ie.
    • <% Html.RenderPartial("~/Views/Address/AddressControl.ascx", ViewData.Model.Company.Address); %>

      .csharpcode, .csharpcode pre
      font-size: small;
      color: black;
      font-family: consolas, “Courier New”, courier, monospace;
      background-color: #ffffff;
      /*white-space: pre;*/
      .csharpcode pre { margin: 0em; }
      .csharpcode .rem { color: #008000; }
      .csharpcode .kwrd { color: #0000ff; }
      .csharpcode .str { color: #006080; }
      .csharpcode .op { color: #0000c0; }
      .csharpcode .preproc { color: #cc6633; }
      .csharpcode .asp { background-color: #ffff00; }
      .csharpcode .html { color: #800000; }
      .csharpcode .attr { color: #ff0000; }
      .csharpcode .alt
      background-color: #f4f4f4;
      width: 100%;
      margin: 0em;
      .csharpcode .lnum { color: #606060; }


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s