Reputation: 11963
i wonder how i can append the []
(string) right after a function call
something like
@Html.ActionLink("x", "y")[]
I have tried this but it results in compile error since the bracket is consider as an index operator
i want the html result to be like
<a ....>...</a>[]
Upvotes: 3
Views: 185
Reputation: 700562
You can use parentheses to specify what's in the expression:
@(Html.ActionLink("x", "y"))[]
Upvotes: 2