ASP.NET MVC 3 and ASP.NET MVC 4 razor syntax changes?

Deanganycle

New Member
I create two application in VS20121. Application#1. MVC 3, NET 4.52. Application#2. MVC 4, NET 4.5Now I open any .cshtml file and add the following code:\[code\]<div>@if (Model == null){ @string.Format("{0}", "test")}</div>\[/code\]It works just fine in Application#1 (mvc3) and I see "test" word displayed. But it doesn't work in Application#2 (mvc4). Could anybody explain why it happens and what should be changed?
 
Back
Top