These are following some rules for Razor Syntax: Razor code blocks are enclosed in @{ … } Inline expressions (variables and functions) start with @ Code statements end with a semicolon Variables are declared with the var keyword Strings are enclosed with quotation marks C# code is case sensitive C# files have the extension .cshtml
These are following some rules for Razor Syntax: