Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert Glyphicons bootstrap in @Html.ActionLink mvc asp.net

Tags:

asp.net-mvc

Would enter Glyphicons Boostrap instead of "Edit" in the code below. Could you give me an example to do.

@Html.ActionLink("Edit", "Edit", new { id = Model.id_rod }) |

To bring up the image instead of writing.

like image 828
rysahara Avatar asked Apr 13 '14 22:04

rysahara


People also ask

How do I use Glyphicons in Bootstrap?

Bootstrap includes 260 glyphs from the Glyphicon Halflings set. Glyphicons Halflings are normally not available for free, but their creator has made them available for Bootstrap free of cost. As a thank you, you should include a link back to Glyphicons whenever possible. Use glyphicons in text, buttons, toolbars, navigation, or forms:

How many glyphs are there in Bootstrap?

Bootstrap includes 260 glyphs from the Glyphicon Halflings set. Glyphicons Halflings are normally not available for free, but their creator has made them available for Bootstrap free of cost. As a thank you, you should include a link back to Glyphicons whenever possible.

How to add bootstrap in ASP NET MVC and web forms?

To add the bootstrap in your ASP.NET project (both MVC and Web Forms), use the below cdn references instead of downloading and adding it to your project. Using CDN will help you to improve the performance of your web page, but the disadvantage is, you have to be connected to internet for this to work, even in development or production environment.

How do I insert a glyphicon in HTML?

A glyphicon is inserted with the following syntax: <span class="glyphicon glyphicon-name"></span>. The name part in the syntax above must be replaced with the proper name of the glyphicon.


Video Answer


1 Answers

If using Bootstrap 3:

<a href="@Url.Action("Edit", new { id = Model.id_rod })">
    <i class="glyphicon glyphicon-pencil"></i>
    <span class="sr-only">Edit</span>
</a>

Note the use of sr-only will allow users of screen readers and search engines to know what the link is for.

like image 92
Jeremy Cook Avatar answered Sep 30 '22 23:09

Jeremy Cook