0

I'm going to create a website with lots of business logic, connected to a background data model. For these reasons I chose ASP.NET MVC3 as development platform. Unfortunately, I left web programming at the time of the old ASP and JSP and lately I worked with windows applications and C#. Now I'm wondering which is the best(easiest, fastest, most reliable, most compatible with browsers) technique to create user views?

  1. I explored a little Razor, but it is unclear for me, is it a so good choice? Is it supported by forums or still too fresh?
  2. I'm very tempted of using webcontrols since I'm now addicted to them. Would this be a good choice? Can I use webcontrols just in aspx or in razor as well?
  3. What about Ajax controls? Would it be a better choice?

Thanks!

marcind
  • 52,944
  • 13
  • 125
  • 111
Francesco
  • 964
  • 2
  • 17
  • 41

2 Answers2

2
  1. Yes, Razor is a good choice. See here for a pretty good summary.
  2. As Robert mentioned, "controls" go against the MVC pattern and will not even work in Razor. You want html helpers for small bits of markup (for example, to render a text box) and partial views for more complicated things (like a shopping cart widget)
  3. Use of AJAX depends on the UI needs of your application. Initially it would be simpler to start without AJAX. Also, some clients might have JavaScript disabled and then AJAX would not work.
Community
  • 1
  • 1
marcind
  • 52,944
  • 13
  • 125
  • 111
1

"web controls" are not appropriate for MVC at all - they go against the MVC pattern. Instead, look into "partial views" for creating common bits of UI that get reused across multiple pages

Robert Levy
  • 28,747
  • 6
  • 62
  • 94