I am using logic to display certain text one on view that is working, and using that same logic in a modal which is only showing the else part of the statement, not the if.
This is the one that works as it should:
@if (Model.JobId > 0)
{ <a href='@Url.Action("Index", "Summary", new { id = Model.ScenarioId }, null)'>@Model.JobName Summary</a> }
else
{ <a href='@Url.Action("Index", "Summary", new { id = Model.ScenarioId }, null)'>@Model.Name Summary</a> }
and here is the one that only shows the else part of the statement, the if just returns blank.
@if (Model.JobId > 0)
{ <h4 class="modal-title" id="myModalLabel">@Model.Customer.FirstName @Model.Customer.LastName | @Model.JobName</h4> }
else
{ <h4 class="modal-title" id="myModalLabel">@Model.Customer.FirstName @Model.Customer.LastName | @Model.Name</h4> }
Aucun commentaire:
Enregistrer un commentaire