I am creating a sample ASP.NET MVC 3 site using Razor as view engine. The razor syntax starts with @
character e.g. @RenderBody()
. If I write @test
@@ is the escape character for @ in Razor views as stated above.
Razor does however try to work out when an '@' is just an '@' and where it marks C# (or VB.Net) code. One of the main uses for this is to identify email addresses within a Razor view - it should not be necessary to escape the @ character in an email address.