This should look like thid
<table id='myTable' border='1'>
@foreach (var sessionTime in Model.SessionsByTime)
{
<tr>
<td>@sessionTime.StartTimeFriendly</td>
<td></td>
</tr>
<table>
@foreach (var session in sessionTime.sessionsResults)
{
<tr>
<td width="300"></td>
<td width="300">@session.Title</td>
</tr>
}
</table>
}
</table>
if you need to diplay some text that is not wrapped in an html tag you need to use @:
:
@foreach(var s in list) {
@: hello there @s
<text>this also work instead of @: and is usuful
when you need more than one line
</text>
}
if you are inside a code block and not inside an html tag, Razor will assume that you are just writing code that's why @:
or <text>
is needed