Search code examples
razortoolbox

Razor : Where is Server side controls


I am new to MVC 3. When I generated a file called NewEmployee.cshtml, I could see only HTML controls.

  1. Where is the server side controls ?
  2. If it does not support those controls, why should I go for Razor ?

Solution

  • MVC is a different way of building websites/applications to webforms.

    You should have a look at some of the tutorials on www.asp.net to see the differences.

    Answers: 1) There are no server side controls 2) There are other benefits to using Razor (or aspx) within the MVC model. UI development is simpler/separated and helps when building interfaces with jQuery, no fighting with webcontrols and microsoft ajax.

    HTH