Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Below is my actionlink but i don't want it displaying the Title or "btn btn-primary btn-xs" all i want it to display is the "glyphicon glyphicon-eye-open" how would i do this using @Html.ActionLink and code below.

Below code is what i have tried

HTML
<span class="clickable filter" data-toggle="tooltip" title="View" data-container="body">@Html.ActionLink("View", "View", "SIMCard", new { id = item.SIMCardID }, new { @class = "btn btn-primary btn-xs" })</span>
Posted

1 solution

You need something like this.

<a href="@Url.Action("View", new { id = item.SIMCardID })">
<i class="glyphicon glyphicon-eye-open"></i>
<span class="sr-only">View</span>
</a>
 
Share this answer
 
Comments
Member 11838038 4-Aug-15 5:19am    
Legend it works but question what does this part do <span class="sr-only">View</span>
does it hide view?
John C Rayan 4-Aug-15 6:00am    
sr-only is intended for screen readers. Not doing anything otherwise but do not remove it. It helps accessibility. You have to read more about sr-only if you want to understand when you have some time. For now just ignore...
Member 11838038 4-Aug-15 6:07am    
thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900