Search results

Getting Started

This section briefly explains about how to include a simple Toolbar in your ASP.NET MVC application. You can refer ASP.NET MVC Getting Started documentation page for introduction part part of the system requirements and configure the common specifications.

Adding component to the Application

  • Now open your view page to render Toolbar component.
razor
data.cs
@Html.EJS().Toolbar("defaultToolbar").Items(new List<ToolbarItem> {
            new ToolbarItem { PrefixIcon = "e-cut-icon tb-icons", TooltipText = "Cut" },
            new ToolbarItem { PrefixIcon = "e-copy-icon tb-icons", TooltipText = "Copy" },
            new ToolbarItem { PrefixIcon = "e-paste-icon tb-icons", TooltipText = "Paste" },
            new ToolbarItem { Type = ItemType.Separator },
            new ToolbarItem { PrefixIcon = "e-bold-icon tb-icons", TooltipText = "Bold" },
            new ToolbarItem { PrefixIcon = "e-underline-icon tb-icons", TooltipText = "Underline" },
            new ToolbarItem { PrefixIcon = "e-italic-icon tb-icons", TooltipText = "Italic" },
            new ToolbarItem { PrefixIcon = "e-color-icon tb-icons", TooltipText = "Color-Picker" }
}).Render()
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace EJ2CoreSampleBrowser.Controllers
{
    public partial class ToolbarController : Controller
    {
        public IActionResult Index()
        {
            return View();
        }
        public IActionResult DefaultFunctionalities()
        {
            return View();
        }
    }
}

See Also