How to add a razor value and a string in an HTML attribute?
asp.net-mvc, razor
Solution
try:
<div id="@("box"+number)"></div>
Problem
I know it's simple and I am probably missing something...Assume I want to give IDs to generated controls, when my model is a list of integers: ``` @model List<Int> ... foreach(int number in Model) { <div id="box + @number"></div> } ... ``` box + @number actually gives me : id="box + 1", "box + 2", etc. When I want : "box1", "box2". What am I doing wrong?