ASP.NET MVC CodePlex Preview 5 Released

asp.net, asp.net mvc, code 0 comments suggest edit

Download the MSI and Release notes here.

Last night we released ASP.NET CodePlex Preview 5 on CodePlex. Be on the lookout for one of those famous epic blog posts from ScottGu describing the release. In the meanwhile, the release notes contain short write-ups of what has changed.

We didn’t originally plan to have another preview. However, we implemented a few significant chunks of functionality and were dying to get feedback so that we could incorporate it into the product before Beta. It helps that with five or so of these interim releases, we’ve become pretty efficient producing these releases.

We plan to have our next release be our official Beta, which means we’ll have a lot more test passes to produce and run before we release the next one.

In the meanwhile, take the code for a test drive and let us know what you think. Some of the naming needs to be cleaned up, so you can expect some name changes and improvements to the API from here to Beta, along with a lot of bug fixes and a few more features. Naming classes is tough, so we appreciate good suggestions there. :)

One change that I think I forgot to mention in the release notes is that the Ajax helpers do not accept inline script any longer, they take method names. Those helpers are all in their own namespace now as extension methods which allow you to completely swap them out with ones of your own.

If you’re interested in more details about how our action method selection works, be sure to read my post entitled How a Method Becomes an Action. Be sure to keep an eye on Brad Wilson’s blog too, as he put in some work on this feature and will describe the view engine changes.

UPDATE: Brad just blogged about partial rendering and view engines in ASP.NET MVC.

Technorati Tags: aspnetmvc,asp.net

Found a typo or error? Suggest an edit! If accepted, your contribution is listed automatically here.

Comments

avatar

42 responses

  1. Avatar for Simone Chiaretta
    Simone Chiaretta August 28th, 2008

    Next one will be a Beta... that's a great thing to know. Thanks for sharing this.

  2. Avatar for Seth Rowe [MVP]
    Seth Rowe [MVP] August 28th, 2008

    Great to hear that we have another preview to play with - though I think you caught us all off guard. Even better is the lack of major breaking changes in the release!
    Any word on a scheduled release date for the beta (or even the number of planned betas)?

  3. Avatar for Scott
    Scott August 28th, 2008

    Yay! Something to play with while my wife and kid are out of town.

  4. Avatar for Remco Ros
    Remco Ros August 28th, 2008

    I didn't find anything in the release notes on User Controls? What happened to RenderUserControl? Is this replaced by RenderPartial? How do we use it?

  5. Avatar for Shiny Zhu
    Shiny Zhu August 28th, 2008

    Great jobs! I've just blogged a Chinese post introduce this release.
    Will the official beta come to us next month?

  6. Avatar for haacked
    haacked August 28th, 2008

    @Remcos yes, use RenderPartial instead of RenderUserControl. UserControls are specific to the WebFormViewEngine. RenderPartial works with any view engine that supports it (which I imagine we'll see the others updated soon).

  7. Avatar for Derik Whittaker
    Derik Whittaker August 29th, 2008

    Phil,
    When i try to use RenderPartial I am getting the following
    "The best overloaded method match for 'System.IO.TextWriter.Write(char)' has some invalid argument"
    U got any examples on how to use this method correctly?

  8. Avatar for Mike
    Mike August 29th, 2008

    I think RenderPartial deserves a big write up from you or ScottGu or whoever is best qualified. The reason is because it is the third version of 'user controls' that you tried. Of course, we see more because you release more, so we see early builds. But I want to know if this is the way it's going to be in the future, or will it change again. Also, a really detailed explanation of how you got there. I never quite understood why the previous versions were dropped, I couldn't get my head around the cons that I saw posted on the forums.
    I also gor interested in Ruby on Rails and noticed that they had a similar 'problem'. They have dropped support for one way of doing partials even after v1. So, is this problem just not well understood in web MVC type 2 frameworks? I mean, if the Rails guys and even Microsoft struggles with it, is it that big of a challenge?
    Thanks!

  9. Avatar for Mike
    Mike August 29th, 2008

    Please provide support for 'areas', I didn't see it in the changes. Look at this to see what the current situation is now:
    blog.codeville.net/.../implementing-a-custom-ro...
    Thanks for considering, I'd love a comment from you on this feature. Is it not possible because Routing already shipped?

  10. Avatar for Ryan
    Ryan August 29th, 2008

    I don't see any updates on Scott Gu's blog in the last six weeks. Any idea of when we will get a post about the new and partially documented features in Preview 5?
    I agree completely with Mike. We really need to see some documentation around RenderPartial.

  11. Avatar for Brad Wilson
    Brad Wilson August 29th, 2008

    @Mike,
    Ask and ye shall receive. :)
    bradwilson.typepad.com/.../partial-renderi.html

  12. Avatar for Lamin Barrow
    Lamin Barrow August 29th, 2008

    Yay.. i have been on the lookout for something like this. Preview 5 sounds very exciting. Thanks Phil and the team.

  13. Avatar for Throwspoop
    Throwspoop August 29th, 2008

    Any idea why this error would occur: "The UrlRoutingHandler is not used to directly handle requests."
    Its failing here:
    public void Page_Load(object sender, System.EventArgs e)
    {
    HttpContext.Current.RewritePath(Request.ApplicationPath);
    IHttpHandler httpHandler = new MvcHttpHandler();
    httpHandler.ProcessRequest(HttpContext.Current);
    }
    In Default.aspx....i don't recall there being code in here in previous releases. Note that I just created a new MVC web project and tried to run it - this isn't a project promoted from release 4.

  14. Avatar for Throwspoop
    Throwspoop August 29th, 2008

    For reference here is the Preview 4 default.asp page_load:
    public partial class _Default : Page
    {
    public void Page_Load(object sender, System.EventArgs e)
    {
    Response.Redirect("~/Home");
    }
    }

  15. Avatar for Jahedur Rahman
    Jahedur Rahman August 29th, 2008

    Great to hear it :)

  16. Avatar for shawn
    shawn August 29th, 2008

    @Derik
    Replace <%=Html.RenderUserControl("foo.aspx",model)
    with
    <%Html.RenderParital("Foo")

  17. Avatar for Corey Gaudin
    Corey Gaudin August 30th, 2008

    Just in case anyone needs this when going from Preview 4->5:
    -If you are looking for "UpdateFrom" from BindingExpression, its gone, instead use in the Controller class (its protected inside it now) UpdateModel
    -If you are having issues with Html.TextArea, add an extra null at the end of the parameter list (for HTMLAttribs)
    -If you are having issues with Html.Checkbox, the parameter list has changed alot, there is no value and text now.
    -If you are having an issue with BuildUrlFromExpression<t> ..., then you will need to look into the Microsoft.Web.Mvc dll (it is under LinkBuilder)
    -Several things have been removed that I have yet to find a way around (like the ActionMethod property from ActionFilters)

    We definitely need a posting on the new features such as Validation additions (and how it works behind the scenes), Ajax changes, Return type of PartialView from controller, etc.

  18. Avatar for Magnus M&#229;rtensson
    Magnus M&#229;rtensson August 30th, 2008

    Next is Beta time! ;~) Great, now finally I may be able to persuade a customer to begin production development on MVC! Thanks, /Magnus

  19. Avatar for Throwspoop
    Throwspoop August 31st, 2008

    @throwspoop: Any idea why this error would occur: "The UrlRoutingHandler is not used to directly handle requests."
    This was caused by the fact that I still have VS2008 SP1 installed on machine. Update to the RTM SP1 and all is good.

  20. Avatar for Throwspoop
    Throwspoop August 31st, 2008

    Correction: I had VS2008 Beta 1 installed on my machine...

  21. Avatar for Ronnie Hoogland
    Ronnie Hoogland August 31st, 2008

    Phil,
    When you guys release a preview does the code already go through StyleCop or is that a beta activity? And are you using a different rule set than the one you get with the StyleCop download?

  22. Avatar for haacked
    haacked September 1st, 2008

    We run everything through Code Analysis (FxCop). We don't run anything through StyleCop AFAIK.

  23. Avatar for Steve
    Steve September 1st, 2008

    Thanks Corey - it would have been nice to see that in the readme.
    I think getting mvccontrib running is first priority :)

  24. Avatar for Steve
    Steve September 1st, 2008

    Anyone know what happened to the CheckBoxBuilder ?

  25. Avatar for Steve
    Steve September 1st, 2008

    Anyone know what happened to ReadFromRequest ?

  26. Avatar for Steve
    Steve September 1st, 2008

    I must say, this preview 5 release is the worse I've seen so far. Maybe because ScottGu isn't around?
    Previously, the readme would include breaking changes, this release document barely gives any information and there is much that isn't working. Where is the 'moving from preview 4 to preview 5 changes?'
    I give MS a 1 out of 5 on this preview, which is too bad, prior to this it was done very well...
    Guess I'm really surprised to see 'ReadFromRequest' gone without any mention of it at all.
    Too bad I've used it all over the place - seems rather useful - why is it gone?

  27. Avatar for Eric Glanz
    Eric Glanz September 1st, 2008

    I just installed Preview 5, and Visual Studio 2008 crashes whenever I attempt to load a view in either designer or markup mode. Any ideas on why this would be happening?

  28. Avatar for Steve
    Steve September 1st, 2008

    DropDownList now takes a "optionLabel" - no other overload without it - so now all my dropdownlists much have some sort of --select one--??
    What if I don't want that. Sure, it's nice to have, but why assumed I want it no matter what???)

  29. Avatar for Steve
    Steve September 1st, 2008

    ok, so you pass an empty string it doesn't show a label.
    lol - that is odd isnt it?

  30. Avatar for Steve
    Steve September 1st, 2008

    What happened to the ActionLink<> ?
    This was, I thought, done rather well - using Lamba expressions, etc..
    Is this gone now?
    ie. this is what I had before:
    <%= Html.ActionLink<mycontroller>(c => c.DoSomething(), "DoSomething", new { Target = "_blank" })%>
    Worked great - not sure the reason for this new change that doesn't seem to support this?

  31. Avatar for Steve
    Steve September 1st, 2008

    ok sorry :(
    lol - I see it's been moved to the Microsoft.Web.Mvc
    Things see a bit spread out now between the assemblies I think , is there a certain approach you guys are taking to this ?
    ie. What is System.Web.Mvc vs. Microsoft.Web.Mvc ? Do you see 'controls' as being in the Microsoft namespace ? Or is this a gradual move away from the 'System' namespace?

  32. Avatar for Steve Sanderson
    Steve Sanderson September 1st, 2008

    Lots of cool new stuff to play with... Nice work with the AntiForgeryToken bits. Looking forward to some detailed explanation of the new ModelState stuff.

  33. Avatar for Jarda Jirava
    Jarda Jirava September 1st, 2008

    Hi Phill,
    thank you for your next step to the beta.
    I have one question or maybe requirements because I didn't find this yet. Is there any chance how to create a link or redirect to the url with anchor (#)?
    Thank you and have a nice day.
    --J.

  34. Avatar for haacked
    haacked September 1st, 2008

    @Steve The Microsoft namespace represent bits that might not make it into the core, but we might include in the future.
    @Steve Sanderson Cool! We didn't put it into the core because we don't yet have a full security review of it. We don't want to make any claims with it until we know it'll be somewhat effective. Glad to see you writing it up though.

  35. Avatar for labilbe
    labilbe September 13th, 2008

    What is this input hidden field added when you call Html.Checkbox ?

  36. Avatar for Tim Van Wassenhove
    Tim Van Wassenhove September 15th, 2008

    I can confirm the vs2k8 sp1 crashes :/

  37. Avatar for James Taylor
    James Taylor September 18th, 2008

    I was also having a problem with Visual Studio 2008 SP1 crashing every time I tried to open a View. I uninstalled "PowerCommands for Visual Studio 2008" and the problem has gone away. I don't have time to investigate why this worked, but wanted to share this just in case it helps anyone else out.

  38. Avatar for Radek
    Radek September 24th, 2008

    Hi Phil, I have one short question: Why don't you encode & sign in querystring when generating URL?

    Url.Action("Action", "Controller", new {sad = true, happy = false}

    will generate:

    href="/app/Controller/Action?sad=True&happy=False

    which breaks XHTML rules. HtmlAttributeEncode can maybe do the magic.
    Oh, there is one more more question: Where is the right place to put such question? =)

  39. Avatar for Samiq
    Samiq September 28th, 2008

    There are also breaking changes in Html.DropDownList which now request for a optionLabel which inserts a non-value option at the top of the combo box, I think this should be optional. There are times where I don't like this to be generated.

  40. Avatar for M
    M September 28th, 2008

    How should I reference to Microsoft.Web.Mvc? It's not a strongly named assembly. I would like to use the LinkBuilder.

  41. Avatar for hudo
    hudo September 30th, 2008

    VS crashes when opening aspx view :(

  42. Avatar for Pankaj
    Pankaj December 30th, 2008

    Its seems link ASP.NET MVC Preview 5 is not stable as of now...:(