How to use @ symbol in MVC?

When I use @ in Razor MVC -as text, I get a parsing error:

"&" is not valid at the start of a code block. Only identifiers, keywords, comments, "(" and "{" are valid. 

This should be something simple, I can not understand.

Code:

 <p><b>2011</b> <a target="_blank" href="http://www.blabla.nl">blabla</a>w/ @twittername<br />Done 12/2011</p> 
+4
source share
3 answers

One way is to use HTML &#64;

+7
source

Well, that was easy ... Stupid to me :)

Use @@

+4
source

Use as

 @@ 

He will work confidently.

+2
source

Source: https://habr.com/ru/post/1386733/


All Articles