I navigated to a website with a form that has no submit button but does have form. I would like to submit this form. How to do this using C# and WebBrowser control?
Cam Soper
Try this (or something like it):
HtmlElementCollection elements = this.webBrowserControl.Document.GetElementsByTagName("Form");
foreach(HtmlElement currentElement in elements)
{
currentElement.InvokeMember("submit");
}
来源:https://stackoverflow.com/questions/1539685/how-programmatically-submit-a-form-without-a-submit-button-in-webbrowser