Tuesday, July 23, 2019

asp.net mvc 3 - Escape @ character in razor view engine



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 on my cshtml page it gives me parse error




CS0103: The name 'test' does not exist in the current context




How do I escape '@' character?



Answer



@@ should do it.




No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...