I'm looking to set the value of a TextArea using the .NET WebBrowser Control.
I have been able to set the values of textboxes using the following code (replace "username" with the name of the texbox):
webBrowser1.Document.All.GetElementsByName("username")[0].SetAttribute("Value", "SomeUser");
I tried using similar code on a TextArea (using GetElementById) and failed to remember that TextArea input types do not contain a "Value" attribute. I have also tried setting the InnerHtml and InnerText of the TextArea but the compiler continues to throw null reference exception errors or index out of bounds errors when trying set the value of the TextArea input.
Does anyone have any idea on how to set the text inside a TextArea using the WebBrowser Control? Any advice would be much appreciated! Thanks in advanced.