Http://www.microsoft.com/web/gallery/install.aspx? Appid = mvc3
1. htmlencode of razor
By default, our razor output will undergo htmlencode encoding.
For example
1:@{
2:VaR html ="<P> text </P>";
3:}
4:@ Html
In fact, the output content is the encoded HTML
Previously we solved this problem by converting the text into ihtmlstring:
1:@{
2:VaR html =NewHtmlstring ("<P> text </P>");
3:}
4:@{
5:VaR html = mvchtmlstring. Create ("<P> text </P>");
6:}
One of the two methods can directly output htmlCodeIn ASP. net mvc 3 RC2, an htmlhelper method raw is added to directly output unencoded HTML:
1:@{
2:VaR html ="<P> text </P>";
3:}
4:@ Html. Raw (HTML)
2. Some other naming changes:
Change controller. viewmodel and viewpage. View to viewbag.
Change controllersessionstateattribute to sessionstateattribute.
Change the fields attribute in remoteattribute to additionalfields.
Change the skiprequestvalidationattribute class to allowhtmlattribute.
3. jquery Integration
ASP. net mvc 3 RC2 integrates jquery 1.44, jquery validation 1.7, and jquery UI 1.86
4. fixed the problem that blank lines will automatically appear before the razor syntax uses @ model.