Scripting
9 Dec 2019 / 1 minute to read
Essential HTMLUI has extensive support to Scripts. Scripting involves creating self-contained documents. The concept behind this is to make the interface easier just by loading different HTML documents that contain the logic in themselves.
<html>
<body bgColor="#edf0f7">
<p>
<input type="text" id="txt"></input>
</p>
<script language="C#">
using System;
using System.IO;
using System.Xml;
using System.Windows.Forms;
using System.Drawing;
using System.Collections;
using Syncfusion.Windows.Forms.HTMLUI;
namespace Syncfusion
{
public class Script
{
INPUTElementImpl script;
Hashtable tab = new Hashtable();
/* Initializes script.*/
public static Script OnScriptStart()
{
return new Script();
}
public Script()
{
tab = Global.Document.GetElementsByUserIdHash();
script = tab["txt"] as INPUTElementImpl;
// User control property sets the user control instance for the particular input element declared by the user
script.UserControl.CustomControl.Text = "This is a sample for scripting";
}
}
}
</script><br/>
</body>
</html>
HTMLUIScripting sample
This sample illustrates the support of self-contained HTML documents in HTMLUI.
By default, this sample can be found under the following location:
…_My Documents\Syncfusion\EssentialStudio\Version Number\Windows\HTMLUI.Windows\Samples\Advanced Editor Functions\ActionGroupingDemo_
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page