I\'m using MVC3 and I wanted to use a partial view to create dynamic DOM elements. This is my current partial view:
@model MVCApp.ViewModels.TitlesViewModel
<
You want:
Razor will recognise the @ as the start of code, execute it and render the results in place in the attribute.
Edit:
This didn't work well as a comment, but here's a line from one of my Razor controls:
Try adding a hyphen (-) before the @. It's quite possible that Razor thinks it's an e-mail address and leaving it alone!