我正在尝试从网站中提取一些数据,但提交按钮仅在文档完成事件中第一次调用。加载第一个提交的页面文档完成事件后不执行我的代码是
private void b_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
WebBrowser b = sender as WebBrowser;
string response = "";
response = b.DocumentText;
HtmlElement links = b.Document.GetElementById("btn1");
links.InvokeMember("click");
checkTrafiicButtonClick = true;
MessageBox.Show("");
***// upto these working and loading second page after that i want to fill data
and want to submit but down line is not working and it should be work after
loading the page that i submitted how can i do these***
HtmlElement tfrno = b.Document.GetElementById("TrfNo");
tfrno.SetAttribute("value", "50012079");
HtmlElement submitButon = b.Document.GetElementById("submitBttn");
submitButon.InvokeMember("click");
}