I've read how to use Spark View Engine instead of Webform View Engine in a Mvc2 Project so I think we can do the same with Razor View Engine but when I search on GOOGLE, I cant find anything helpful. So, to you pros I post this question. Please help! Thanks so much!
Attention: Razor in Mvc2 project, not in Mvc3.
Thanks again!
View Engine is responsible for rendering the view into html form to the browser.
All Razor files end with . cshtml. Most Razor files are intended to be browsable and contain a mixture of client-side and server-side code, which, when processed, results in HTML being sent to the browser. These pages are usually referred to as "content pages".
A Razor Page is almost the same as ASP.NET MVC's view component. It has basically the syntax and functionality same as MVC. The basic difference between Razor pages and MVC is that the model and controller code is also added within the Razor Page itself. You do not need to add code separately.
While this is technically possible, you'll need to copy vast swaths of code from the MVC3 source.
Razor will still need .Net 4.0, so this is really not worth it; you should just upgrade to MVC3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With