I'm using razor in Tridion 2013. I have this, and the number must be dynamic

<span class="stars stars5"></span>

I've tried:

<span class="stars stars@Metadata.stars.Description"></span>

But doesn't work... But if I have a space between stars and @Metadata.stars it works

<span class="stars stars @Metadata.stars.Description"></span>

How can I do it?


You could use:


Read more here: http://weblogs.asp.net/scottgu/archive/2010/12/15/asp-net-mvc-3-razor-s-and-lt-text-gt-syntax.aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.