I am moving the project from MVC 2 to MVC3 and the razor viewer mechanism.
In MVC 2, I will have the following html:
<div id="del_<%= Model.ActivityID.ToString() %>"></div>
When using a razor, I tried the following, which displays the literal text " del_@Model.ActivityID.ToString ()" when I want del_1.
<div id=" del_@Model.ActivityID.ToString ()"></div>
To get around the problem, I used:
<div id="@Model.ActivityID.ToString()_del"></div>
Is there any way to get a razor to work with this syntax?
<div id=" del_@Model.ActivityID.ToString ()"></div>
asp.net-mvc razor asp.net-mvc-migration
scottrakes
source share