I am very new to C# and ASP.NET MVC Razor. I want to show a field in my view if the field is not blank.
Code
<tr class="hide" id="trPhone2">
<td class="editor-label">
@Html.LabelFor(model => model.phone2)
</td>
<td>
@Html.EditorFor(model => model.phone2)
</td>
<td>
@Html.ValidationMessageFor(model => model.phone2)
</td>
</tr>
Now, I want to output that first <tr> line if the model.phone2 is "" and else output:
<tr id="trPhone2">
How do I do this using ASP.NET MVC Razor?