Asp.net Web Pages With — Razor Syntax
Use @{ ... } to wrap multiple lines of C# logic, like variable declarations or loops, at the top of your page.
Razor automatically HTML-encodes output, which helps prevent Cross-Site Scripting (XSS) attacks. Asp.net Web Pages With Razor Syntax
Since it's C#, you get full autocomplete and error-checking in Visual Studio. Use @{