i faced this problem
when i multiple this condition on different position on same page i'v got error
@if(User.IsInRole("admin"))
{
@Html.ActionLink("Edit", "Edit", new { id = category.id }) |
@Html.ActionLink("Details", "Details", new { id = category.id }) |
@Html.ActionLink("Delete", "Delete", new { id = category.id })
}
If I understood your intent I would use for example (my understanding is that you want to render a list of actions with a | character between each action) :
@Html.ActionLink("Edit", "Edit", new { id = category.id }) |
text is a Razor syntax to force switching back to the HTML context.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments