This section briefly explains about how to render Tooltip control in your ASP.NET MVC application. You can refer ASP.NET MVC Getting Started documentation page for introduction part of the system requirements and configure the common specifications.
Starting with
v16.2.0.x
, if you reference Syncfusion assemblies from trial setup or from the NuGet feed, you also have to include a license key in your projects. Please refer to this link to know about registering Syncfusion license key in your ASP .NET MVC application to use our controls.
Tooltip control can be rendered with the help of @Html.EJS().Tooltip
tag helper. Add the below code to your index.cshtml
page which is present under Views/Home
folder, where the Tooltip is initialized.
@Html.EJS().Tooltip("Tooltip").Content("Lets go green & Save Earth !!!").ContentTemplate(@<span id='target'>Show Tooltip</span>).Render()
After successful compilation of your application, simply press F5
to run the application.
The following example shows a basic Tooltip.
@using Syncfusion.EJ2
@using Syncfusion.EJ2.Popups
@Html.EJS().Tooltip("Tooltip").Content("Lets go green & Save Earth !!!").ContentTemplate(@<span id='target'>Show Tooltip</span>).Render()
public IActionResult Index()
{
return View();
}
In the above sample code,
#target
is theid
of the element in a page to which theTooltip
is initialized.
Output be like the below.