We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Icon with ejs-textbox

Thread ID:





151310 Feb 6,2020 12:18 PM UTC Feb 7,2020 10:49 AM UTC ASP.NET Core - EJ 2 1
Tags: Text Box
Asked On February 6, 2020 12:18 PM UTC


I am new to Syncfusion and have 2 questions:

1. According to the documentation, I see that using Syncfusion TextBox for ASP.NET core can be performed in at least 2 ways. First is to use <ejs-textbox> tag helper, and second one is to use regular html tags with proper classes. Is there preferable way to use the control since as I can see that for same effect to be achieved <ejs-textbox> encapsulates some styles and scripts (for example ripple effect) while if using html tags this script must be included too?

2. Can I use icons (font awsome or other) with Syncfusion TextBox more easily then in the documentation example, where icons are added through custom style and script without using <ejs-textbox> tag helper? I don't see that <ejs-textbox> has it implemented.

Sureshkumar P [Syncfusion]
Replied On February 7, 2020 10:49 AM UTC

Hi Miloš, 
Greetings from Syncfusion support. 
Query 1: Which is preferable<ejs-textbox> tag helper, and second one is to use regular html tags with proper classes. 
You can prefer the <ejs-textbox> tag helper. The reason is in case if you need floating label, need to add required attribute in the html tags and the manual processing has to be made. So, in order to avoid this complexity, you can prefer the tag helper <ejs-textbox>. 
Query 2: Can I use icons with Syncfusion TextBox more easily then in the documentation example. 
Yes, now you can add the icon for textbox using the public method addIcon. As like below code snippet. 
<div class="control-section"> 
    <div class="control_wrapper accordion-control-section"> 
        <ejs-textbox id="default" placeholder="Enter date" created="onCreateIcon"></ejs-textbox> 
    function onCreateIcon() { 
        var textboxObj = document.getElementById("default"); 
Please find the sample link below: 
Sureshkumar P 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon