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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to syntax highlight HTML code with embedded VBScript

Platform: WinForms |
Control: EditControl |
Published Date: April 30, 2011 |
Last Revised Date: June 21, 2019

How to syntax highlight HTML code with embedded VBScript ?

 

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.

 

C#:

 

this.editControl1.Configurator.Open(configPath);

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

 

VB:

 

Me.editControl1.Configurator.Open(configPath)

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

 

HTML file embedded with VBScript

 

Sample

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

 

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

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
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