cunelson3
-
Posts
2 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by cunelson3
-
-
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!
Razor & HTML with If condition
in ASP
Posted
I'll give it a try. Thanks!