I am working on WebMatrix Samples on using Layout and Razor Syntaxe. Unfortunatly I have an CS0103 Server error when a run the site that says that "The name 'Layout' does not exist inthe current context.
The sample is very easy. Two files, Index.cshtml and _Layout.cshtml in the same directory.
The "_Layout.cshtml" content is:
<meta charset="utf-8" />
And the "index.cshtml" centent is:
Layout = "~/_Layout.cshtml";
The error occurse on the line 2 of the index.cshtml file.
I tred to use Layout = "_Layout.cshtml" but without success. So can you please help me with this issue.
For information :
View Complete Post