C# .NET - How to get or set the innerText of an HTMLElement at runtime using c#

Asked By svt gdwl on 24-Jun-09 06:55 AM
Using c# BHO, I want to replace the innertext of an HTML Element on browser (IE6).
IHTMLElement HtmlElemen; // where HTMLElemen.innerHTML = <TD>Hello World!</TD>

obj = (object)HtmlElemen;
obj.GetType().GetProperty("innerText").GetValue();
obj.GetType().GetProperty("innerText").SetValue();

if normally HTMLElemen.innerText gives "Hello World!",
then how can I get the same thing i.e., "Hello World!" from the obj.GetType().GetProperty("innerText").GetValue();

Solution

Murali Mohan replied to svt gdwl on 24-Jun-09 07:52 AM

Check bellow link.

http://msdn.microsoft.com/en-us/library/system.windows.forms.htmlelement.aspx