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.
Unfortunately, activation email could not send to your email. Please try again.

How do I get access to an HTML element in HTMLUI?

 

The HTML elements are accessed in HTMLUI for developing advanced UIs. The HTML elements are collected in a collection class. The Hashtable, when used as a collection class, stores the HTML elements with a key, specific for each element.

These elements are then assigned to the code variables. The code variables are the objects of the classes, that are responsible for the functionality of the tag elements. These classes contain the definitions for the properties, methods and events for the tag elements. These variables will be used in accessing the HTML elements inside the code.

The following HTML document shows an input tag textbox element with an id as a key for accessing it in the Hashtable.

C#

C#

//declaring the code variable of the tag element

//INPUTElementImpl is responsible for the INPUT tag in HTMLUI

INPUTElementImpl text;

//Collection class accessing the HTML document with the userID as the key

Hashtable htmlelements = this.htmluiControl1.Document.GetElementsByUserIdHash();

//Code variable assigned to the html element with the help of the element's id as the key

this.text = htmlelements["txt"] as INPUTElementImpl;

//usage of the code variable inside the project

this.text.UserControl.CustomControl.Text = "HTML Elements in HTMLUI";

VB

'declaring the code variable of the tag element

'INPUTElementImpl is responsible for the INPUT tag in HTMLUI

Private text As INPUTElementImpl

'Collection class accessing the HTML document with the userID as the key

Private htmlelements As Hashtable = Me.htmluiControl1.Document.GetElementsByUserIdHash()

'Code variable assigned to the html element with the help of the element's id as the key

Me.text = CType(IIf(TypeOf htmlelements("txt") Is INPUTElementImpl, htmlelements("txt"), Nothing), INPUTElementImpl)

'usage of the code variable inside the project

Me.text.UserControl.CustomControl.Text = "HTML Elements in HTMLUI"

Article ID: Published Date: Last Revised Date: Platform: Control:
800 04/30/2011 07/10/2014 Windows Forms HTMLUIControl
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.