I added a cshtml page in an project. When I tried to add the following declaration to it, I get an error: \"The name \'model\' does not exist in current context\".
While you declare the model at the top of the view using code like this:
@model MyModel
you need to capitalise your references to it below, for example:
@Html.Encode(Model.MyDisplayValue)
I believe a missing web.config in the Views folder would be the major cause of this, but if that is fixed and the problem still persists, check that you are using Model, not model to refer to it in the source.