asp.net mvc 3 - Razor view engine, how to write inbetween html? -


i have problem razor syntax. know how write inbetween html.. see sample..

<ul>     @foreach (var x in model) {         <li>             @x.subject - tags:&nbsp;              @if (x.tags != null)             {                  foreach (var t in x.tags)                 {                     @t.name                 }             }             else             {                  no tags             }         </li>     } </ul> 

i should able write "no tags" doesnt work... no tags seem included in code (which not want.

thanks

you need explicitly tell razor you're writing html, writing @:no tags or <text>no tags</text>.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -