ASP. net mvc 2 RC 2 released

Source: Internet
Author: User

: Http://www.microsoft.com/downloads/details.aspx? Familyid = 7aba081a-19b9-44c4-a247-3882c8f749e3 & displaylang = en

 

Currently, only vs2008 (. net3.5) IDE is supported by the next version. The RC version for vs 2010 will be available soon. This RC2 upgrade mainly fixes some bugs, adds some APIs, and improves some methods.

The main changes from ASP. net mvc 2 RC 1 to RC 2 are as follows:

1. ASP. net mvc 2 validation (verification of model data in viewdata) added in RC1 has been replaced by model-validation. That is to say, if you use model binding (automatically bind the model attribute to the view and automatically bind the post-to-controller value from the view ), all attributes are verified, not just the changed data.

(Note: I personally think this may cause inconvenience in some cases. For example, if you only want to bind some attributes of a model as a temporary "container, it may cause modelstate. isvalid to false. I wonder if new features can be selectively used)

2. The new "helper Method for strong HTML (<input> tag)" now supports lambda expressions so that you can use arrays) or collection indexes ). For example, you can do this now:Html. editorfor (M => M. Orders [I]), This sectionCodeThe <input> tag is generated with sequence I as name and the value in the specific array as value.

(Note: This will be extremely useful in dropdownlist .)

3. The adjusted html. editorfor () and HTML. displayfor () extension methods automatically correspond to simple attributes by default. This makes automatic form construction easier.

(Note: Finally, it is a bit like some "Predecessors" MVC forms. I hope this improvement will be more intense)

4. The ID in the client script used for model verification is now clearer. In RC1, the ID will look like this:Form0 _Prefix. Now, ID is changed to prefix with attribute name, for example:Unitprice_validationmessage.

(Note: This change can make front-end developers more complete in page control)

5. the HTML. validationsummary () method adds a parameter to control the display level of the summary information, including the entire model level or a single attribute level.

(Note: it is more user-friendly. Some pages only need to display a tip and do not need to list all the items repeatedly)

6. The default ASP. Net MVC web application template in accountcontroller is more neat.

7. The scaffolding function now provides the delete method in the Controller and view pages (templates ).

8. jquery 1.4.1 is included in the project, replacing the previous Version 1.3.2. You can also synchronously update the vsdoc file for smart prompts.

9. Other meaningful improvements, such as the "auxiliary method of strong HTML (<input> tag)" mentioned in, are now faster.

 

Next versionSource codeCan be downloaded here to: http://aspnet.codeplex.com/Release/ProjectReleases.aspx? Releaseid = 39978

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.