-2

In all the MVC examples I have seen, the razor view is being used, however I have seen mentions of using aspx views, but I have not seen any examples of it in an MVC project.

Are there any reasons that using MVC implicitly assumes that razor is going to be used or there are inherent actual pros of using razor vs aspx view is the cause for this?

The motivation for this question was that I come across severly if'ed viewes in razor, which is the side effect of puching logic into ui rather than a cleaner approach of handling it in at the model level and simplifying the view from having too much logic in it.

ekad
  • 14,436
  • 26
  • 44
  • 46
jimjim
  • 2,414
  • 2
  • 26
  • 46
  • 2
    It makes no real difference. Most find Razor an easier and cleaner syntax - [refer MVC ASP.NET or Razor](http://stackoverflow.com/questions/10492022/mvc-asp-net-or-razor). You can just as easily use poorly designed and _"severly if'ed views"_ with aspx as with razor :) –  Jun 09 '15 at 02:03
  • @StephenMuecke : yep, now I realise that, it was not aspx view that was stopping the deeply nested if hacks, it was me! I'll bring the same approach over to razor – jimjim Jun 09 '15 at 03:54

1 Answers1

1

The choice of view engine is up to you. I prefer Razor because of it's simplicity and cleaner-looking syntax.

This will be helpful to make your decision.

Community
  • 1
  • 1
DDan
  • 8,068
  • 5
  • 33
  • 52