i have following problem:
I'm using webbrowser control in c# winforms, to navigate to specific url which contains textboxes. Now i would like to act after user enters text inside these textboxes. I've tried the Webbrowser.Document.Body.keydown, keyup and keypress events. Only keypress gets fired, which would be fine but when it fires the content of textbox is still unchanged (as i received the event before it got to specific textbox).
So i tried little workaround, to start a new thread with small delay that would do the magic, but in the created thread I cannot access Webbrowser.Document property because :
Specified cast is not valid
Is there some suitable way to solve the problem I have? Thanks for your help
Edit1: After suggestion of blur and change events, i found that event oninput should do what I want. However, it has some flaw: After i click inside the textbox for the first time, the first key press works fine, however the other are not executed. But when I focus out of the element and click inside it again, it works fine, but when i start to write from the start of the field it ignores the event in some cases..
HtmlElement element = webbrowser.Document.GetElementFromPoint(e.ClientMousePosition);
element.AttachEventHandler("oninput", func);