i have the following code in the asp.net mvc view
if (isLoggedInUserAdmin)
{%>
<%=Html.ActionLink("View", "Details", new {id = item.Mail_ID})%>,
<a href='/Users/ConfirmDelete?id= <%=item.Mail_ID%>' class="delete">Delete</a>
<%}
if (userRequiresApproval)
{%>
,<%= Html.ActionLink("Approve", "Approve", new { id = item.Mail_ID })%>
<%}%>
The issue is that it shows up as:
View, Delete , Approve
instead of
View, Delete, Approve
Does anyone know why there would be a space between Delete and the next “,” ??
More than likely it’s from between the
{%>on the one line and the,on the next line.I would forgo the nice indentation and deal with having tag soup by getting
<%} if (userRequiresApproval) {%>,<%=… onto a single line. Do this as much as possible until the space goes away.You may also need to get the
Deleteanchor on the same line as theif (userRequiresApproval)statement, as well.