1

What is the appropriate syntax for retrieving an HTML form's input text box "value" (ie, what the user has typed into the said field) ?

I've tried the <webkitControlName>.Document.GetElementById("email").GetAttribute("value").ToString() but it always returns blank/empty/null, regardless of what has been typed into the field.

VS2012, .NET 4CP

Patrick Alexson
  • 153
  • 1
  • 4
  • 13

1 Answers1

2

This should do the trick.

var inputValue = <webkitControl>.StringByEvaluatingJavaScriptFromString("document.getElementById('email').value");
Vaelek
  • 190
  • 10