フォームの送信
If you know the page has a single form:
foreach (HtmlElement form in webBrowser1.Document.Forms)
form.InvokeMember("submit");
If you know the ID of the form you would like to submit:
HtmlElement form = webBrowser1.Document.GetElementById("FormID");
if (form != null)
form.InvokeMember("submit");
//危険口座初期画面 HtmlElementCollection forms = webBrowser1.Document.All; forms["string"].SetAttribute("value", T_dandya.Text); HtmlElement form = webBrowser1.Document.Forms[0]; form.InvokeMember("submit"); //画像がない場合 if (var.nokoriFileCount == 0) { HtmlElement usernameButton = webBrowser1.Document.GetElementById("auc_submit2"); usernameButton.InvokeMember("click"); } else //画像がある場合 { HtmlElementCollection buttons = webBrowser1.Document.GetElementsByTagName("input"); foreach (HtmlElement element in buttons) { if (element.GetAttribute("value") == "画像登録画面へ") { element.InvokeMember("click"); } } }