Coffeehouse Post

Single Post Permalink

View Thread: Questions regarding "Web pages" vs "Web forms" vs "MVC"
  • User profile image


    You can have a MVC site with completely no MVC inside you know. Wink

    MVC is just a template. I don't know how to apply the template after you choose Web Pages route, but, you can easily start from MVC template and don't use any MVC pattern at all, just plain .cshtml file with everything inside (your logic and html generation and redirect). And in case you wants to use MVC, your site can use MVC.

    • You can write .cs file.
    • Just create a folder called App_Code and put your .cs inside. All .cs has to be under App_Code.
    • You can also write .cshtml as class object, but, this, you can place anywhere in the site.
    • All .cshtml files are converted to class at runtime, so, the performance is the same.

    I suggest you to use Web Pages for now to get a feel of how Razor syntax works and how you can use .cs in your site. This is why I don't recommend MVC for beginners, it is additional learning curve.

    Download WebMatrix and start from there. The core of Razor pages are much simplier to use.

    Also REMEMEBR!!!

    Have this in your web.config 




    VS Express said it is 4.0 in the GUI, but, sometimes it turns to 3.0 if you don't specify it.