Search code examples
c#asp.netasp.net-mvcrazorrazor-2

Difference between @: and <text> in Razor


What's the difference between these 2 in Razor? I find that I can accomplish the same, whether I use @: or <text>.


Solution

  • Scott Guthrie wrote about both on his blog. His answer basically boils down to <text> supports multiple lines, while @: is meant to be a more compact form for a single line.