I'm practicing and trying to write a table varying the opening row tags:
@foreach(blah in blahs)
{
if (condition){
@Html.Raw('<tr>');
}
else {
@Html.Raw('<tr class="shaded">');
}
// More row stuff here
</tr>
}
Is there a way to do this? My editor keeps complaining about a missing <tr> tag. Is it possible to add a class to a tag using razor? What's the common practice?
BTW, this is an incredible web site!