CODE
public void OnClickButton1(object sender, EventArgs e)
{
IHTMLDocument2 htmlDocument = browser1.Document.DomDocument as IHTMLDocument2;
IHTMLSelectionObject currentSelection = htmlDocument.selection;
if (currentSelection != null)
{
IHTMLTxtRange range = currentSelection.createRange() as IHTMLTxtRange;
range.pasteHTML(" Text is inserted by pasteHTML method");
range.collapse(true);
range.select();
}
}
But when I get text from browser1 control by this code :
CODE
string documentText = browser1.DocumentText;
It dosen't exist string " Text is inserted by pasteHTML method" in documentText variable !
Anyone can explain why for me, please ? and How can I get that document text which is inserted dynamic by pasteHTML(..) method at runtime ?! thanks alot.
Answers
Know the answer? Post it. Somebody with the same question will find it here.