I have something like this:
@ if(Model.Name == "Bob")
{
<div>blah blah blah</div>
<table><tr><td>blah blah blah</td></tr></table>
}
else
{
<table>
@foreach(Something something in Model.SomethingCollection)
{
<div>@som开发者_高级运维thing.blah</div>
}
<div>more html here</div>
}
that last closing "}" isn't being recognized as the close to my else block though and so it's causing a parser error.
I tried using @} but it doesn't like that. How can I reenter a code block to put in that last "}"
Have you tried removing @ before foreach ?
精彩评论