Reputation: 12419
How do I do this in Razor (VB.NET):
<div class="[email protected]">
If @ViewBag.MyValue
is "xxx", the output should be
<div class="some_prefix_xxx">
Upvotes: 9
Views: 3002
Reputation: 4993
Use parentheses:
<div class="some_prefix_@(ViewBag.MyValue)">
Upvotes: 18