1


I have a HTML5 page loaded in Webkit.Net. Now, I am trying to get the data enetered by user on HTML page.
I am trying the following code:
WebKit.DOM.Document doc1 = webKitBrowser1.Document;
WebKit.DOM.Element name1 = doc1.GetElementById("email");
string test1 = name1.GetAttribute("value");

The code is not working. Value of email element is not coming in test1.
Am I missing something? Do anyone know any workaround or any other method to do this?

Anshul
  • 234
  • 2
  • 16

1 Answers1

0

This is pretty much a duplicate of Get HTML input text value in webkit

The solution is

String test1 = webKitBrowser1.StringByEvaluatingJavaScriptFromString("document.getElementById('email').value");
Community
  • 1
  • 1
Vaelek
  • 190
  • 10