Is the Razor engine really needed to create an MVC3 site with EditorFor syntax? Almost all the examples I've seen are using Razor. Were working on our first MVC project, and would rather not be on the bleeding edge ...
The short answer is "no", you don't have to use Razor. IMHO you should really reconsider moving away from the ASPX view engine. Razor is a very stable platform for generating HTML.
I agree with everyone here.
-10,000 for wanting to use aspx syntax : )
Go for razor.. it will take you 2 minutes to learn. See the syntax reference at:
http://haacked.com/archive/2011/01/06/razor-syntax-quick-reference.aspx
Just remember that @Something expects output and will HtmlEncode it for you (which is a huge +++) but that @{ some other code} does not render output to the stream. So @Html.TextBoxFor() works great but @{Html.TextBoxFor())} I believe won't emit anything and you'll be wondering why there is no output. Other than those gotchas.. its awesome and you will never ever want to go back to aspx again. Seriously.. you will pick it up in no time.
© 2022 - 2024 — McMap. All rights reserved.