Documentation
SolutionDeveloperComplianceProjects
  • Getting Started
  • Technology
    • Application Framework
    • Object-Relational Mapping
    • Security Framework
    • Architecture Pattern
    • API Management
  • Environment
    • Development Tool
    • Database Server
    • Web Server
  • PRESENTATION
    • Design Material
    • HTML Helpers
    • Icon Images
    • Custom CSS
    • JQuery Plugin
      • DataTables
      • Tabs
      • Date Picker
      • Calendar
      • Chart
      • Treeview
    • Client Script
      • Open Modal
      • Close Modal
      • Handle return data
      • Load Content
      • Change Hash
      • Change Title
      • Get actual Hash
      • Get Content
      • Update Content
      • Delete Content
      • Get Partial Content
      • Get Partial Content Async
      • Update Partial Content
      • Update Partial Content Async
      • Delete Partial Content
      • Get Action
      • Update Action
      • Delete Action
      • Cascading Dropdown
      • Display Document
    • MVC View
  • BACKEND
    • Base Controller
    • Controller
    • Base Model
    • View Model
    • Class Utility
      • Constant Values
      • Global Properties
      • Option Helper
      • Setting Helper
    • Data Repository
      • Read Columns
      • Read All Columns
      • Read First Record
      • Read by Primary Key
      • Find Record
      • Insert Record
      • Update Record
      • Delete Entity
      • Delete by Criteria
      • Delete by Primary Key
      • Counting Record
      • Check Exist
      • Generate Row-Id
    • Unit Of Work
    • Data Entity
  • Application Features
    • Account Management
    • Navigation Editor
    • Access Control
  • Examples
    • Simple Page
    • Master Detail
    • Editor Template
Powered by GitBook
On this page
  • General information
  • Installation
  • Examples
  • Example 1: Arrow icon on Refresh Button
  • Example 2: Clickable List Icon in a Table
  • Video
  1. PRESENTATION

Icon Images

PreviousHTML HelpersNextCustom CSS

Last updated 2 years ago

General information

Font Awesome is a popular icon library that provides a wide variety of scalable vector icons that can be customized (size, color, drop shadow, etc) using CSS. It is designed to be used with web projects and it's an easy way to add scalable vector icons and social logos to your website.

A common usage of icons in our applications is for the buttons in the Toolbar of a webpage:

Installation

  1. Download the latest free version for the web***

  2. Store the downloaded files in the folder "Plugins" > "fontsome" (Create the file if it does not exist yet)

  3. Add the following line of code in the "Layout.cshtml" file of the project:

<link rel="stylesheet" href="~/Plugins/fontsome/css/all.min.css" />

Examples

Example 1: Arrow icon on Refresh Button

The following describes the process of putting an arrow icon on a "Refresh" Button, so that it looks like this:

First, go to the Font Awesome webpage and search for "arrow". After finding the right arrow icon, click on it and the following window pops up containing the code for the arrow icon:

Then, insert this code into the line for the "Refresh" Button, placed right before the Text that says "Refresh" because this is where it should be displayed on the Button:

<a id="btn-refresh" class="btn btn-primary"><i class="fa-solid fa-arrow-rotate-right"></i> Refresh</a>

Example 2: Clickable List Icon in a Table

The following describes the process of putting a clickable list icon in every of a column of a Data Table, so that it looks like this:

First, go to the Font Awesome webpage and search for "list". After finding the right arrow icon, click on it and the following window pops up containing the code for the list icon:

Then, insert this code into the line for the first column of the Table body, placed right between the <a> tags:

<tbody>
    @foreach (var item in Model)
    {
        <tr>
            <td class="text-center"><a data-value="@item.ID" class="go-detail"><i class="fa-solid fa-rectangle-list"></i></a></td>
            <td class="text-center">@item.SerialID</td>
            <td>@item.Station.Name</td>
            <td class="text-center">@string.Format("{0:MM/dd/yy}", item.CreatedDate)</td>
            <td class="text-center">@Html.CheckBox("default", item.IsDone, new { @disabled = "disabled", @style = "height:15px" })</td>
        </tr>
    }
</tbody>

Video

Open the following link:

https://fontawesome.com/v5/download