How do I submit a form inside a WebBrowser control?

后端 未结 3 1390
春和景丽
春和景丽 2020-12-08 16:40

How can I create a program with C# to submit the form(in the web browser CONTROL in windows Apps)automaticlly ?

3条回答
  •  再見小時候
    2020-12-08 16:48

    If you know the page has a single form or you want the first form:

    HTMLDocument doc = webBrowser.Document as HTMLDocument;    
    HTMLFormElement form = doc.all.OfType().First();
    form.submit();
    

提交回复
热议问题