I have some code like:
<table class="invisibleforprint">
<thead>
<tr class="mainheader">
<th>@Html.ActionLink("Invoice Number", "Index", new { sortOrder= ViewBag.NumberSortParm })</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td class="invoiceActions">
<input type="button" class="btnresetinvoice button" value="Reset" data-invoiceid="@item.InvoiceId" />
</td>
</tr>
}</tbody>
</table>
Which compiled fine. I went and added an if statement in the input:
<table class="invisibleforprint">
<thead>
<tr class="mainheader">
<th>@Html.ActionLink("Invoice Number", "Index", new { sortOrder= ViewBag.NumberSortParm })</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td class="invoiceActions">
<input type="button" class="btnresetinvoice button" value="Reset" data-invoiceid="@item.InvoiceId" @{ if(item.PMApproved != true) { @:disabled="disabled" } } />
</td>
</tr>
}</tbody>
</table>
It's giving the error '} expected'
Say what? I've added an equal amount of opening closing brackets.
Anyone know what I've done wrong?