How to access the inner HTML text of the current HTML element in the HTMLUI control?
9 Dec 2019 / 1 minute to read
You can access the inner HTML text of the current HTML element in the HTMLUI control by using the InnerHTML property of the HTMLUI control. This property also allows access to the child elements of the HTML elements.
The following HTML document contains a div element. The code snippet shows how the inner text of the element is accessed and displayed in the output at run time.
<!-- HTML Document -->
<html>
<body>
<div id="div1">
Have an issue you need to contact Syncfusion about? Use our state of the art incident management
system - Direct-Trac.
</div>
</body>
</html>
Hashtable tab = this.htmluiControl1.Document.GetElementsByUserIdHash();
DIVElementImpl div1 = this.tab["div1"] as DIVElementImpl;
MessageBox.Show(div1.InnerHTML.ToString());
Private tab As Hashtable = Me.htmluiControl1.Document.GetElementsByUserIdHash()
Private div1 As DIVElementImpl = CType(IIf(TypeOf Me.tab("div1") Is DIVElementImpl,
Me.tab("div1"), Nothing), DIVElementImpl)
MessageBox.Show(div1.InnerHTML.ToString())
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