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

How to syntax highlight HTML code with embedded VBScript in WinForms SyntaxEditor (EditControl)?

Platform: WinForms |
Control: EditControl

Highlight html code

The EditControl provides built-in syntax highlighting support to popular languages such as C#, VB.NET, XML, HTML, Java, SQL, PowerShell, C, JavaScript, VBScript, and Delphi. But, the EditControl does not have built-in syntax highlighting support for files that have more than one language such as HTML embedded with VBScript. However, you can achieve this using custom language configuration. To demonstrate this, a configuration file that defines a custom language (HTML embedded with VBScript) has been prepared and loaded to the EditControl using the Configurator.Open function. The attached sample demonstrates this.



this.editControl1.LoadFile(Path.GetDirectoryName(Application.ExecutablePath) + @"\..\..\Test Files\HTML_VBScript.html");



Me.editControl1.LoadFile(Path.GetDirectoryName(Application.ExecutablePath) & "\..\..\Test Files\HTML_VBScript.html")


HTML file embedded with VBScript



C#: http://www.syncfusion.com/downloads/support/directtrac/general/ze/CSharp-915372190

VB:  http://www.syncfusion.com/downloads/support/directtrac/general/ze/VB-1453619925


Reference link: https://help.syncfusion.com/windowsforms/syntax-editor/syntax-highlighting

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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