s*i 发帖数: 5025 | 1 在.NET2.0下,VS2005 (or Beta)用WebBrowser control.
要做如下事情:
1。访问www.insidercow.com
2。在网页的textbox里填上 IBM
3。“点击”search,进入IBM的insider trading 网页(最终目的)
怎么做2和3呢? 当然用IE control是可以的。 | j*****o 发帖数: 320 | 2 For 2 and 3, why not submit to the form handler directly?
webBrowser1.Navigate("http://www.insidercow.com/history/company.jsp?company=IBM"
However, you may do #2 like the following.
... Navigate...
webBrowser1.Navigate("http://www.insidercow.com/insidercow.jsp");
... DocumentCompleted ...
HtmlDocument fDoc;
fDoc = webBrowser1.Document;
fDoc.Forms[1].All[5].InnerText = "IBM";
I haven't found the way to submit the form yet.
【在 s*i 的大作中提到】 : 在.NET2.0下,VS2005 (or Beta)用WebBrowser control. : 要做如下事情: : 1。访问www.insidercow.com : 2。在网页的textbox里填上 IBM : 3。“点击”search,进入IBM的insider trading 网页(最终目的) : 怎么做2和3呢? 当然用IE control是可以的。
| s*i 发帖数: 5025 | 3 Thanks. Your solution works.
I doubt there is a way to simulate "click" in the new model.
【在 j*****o 的大作中提到】 : For 2 and 3, why not submit to the form handler directly? : webBrowser1.Navigate("http://www.insidercow.com/history/company.jsp?company=IBM" : However, you may do #2 like the following. : ... Navigate... : webBrowser1.Navigate("http://www.insidercow.com/insidercow.jsp"); : ... DocumentCompleted ... : HtmlDocument fDoc; : fDoc = webBrowser1.Document; : fDoc.Forms[1].All[5].InnerText = "IBM"; : I haven't found the way to submit the form yet.
|
|