how to retrieve subpage contents frm a html usingweb browser and mshtml

May 11 2005 10:30 PM
Hi All., i need to scrap html content from web pages. scenario 1: the source page contains 4 sub pages. able to handle the parent page into web browser control using 'axWebBrowser1' control. now how to scrap the sub pages from this control.. any help is appriciated: my code: FrmMain_Load(object sender, System.EventArgs e) { object loc = "http://www.a.com/b.php"; this.axWebBrowser1.Navigate2(loc); } private viod axWebBrowser1_DocumentComplete() { HTMLDocument myDoc = new HTMLDocumentClass(); myDoc = (HTMLDocument) axWebBrowser1.Document; HTMLInputElement otxtUID = (HTMLInputElement) myDoc.all.item("username", 1); otxtUID.value = "value"; HTMLInputElement otxtPWD = (HTMLInputElement) myDoc.all.item("password", 1); otxtPWD.value = "value"; HTMLFormElement obtnSubmit = (HTMLFormElement) myDoc.all.item("value", 0); obtnSubmit.submit(); } in above code: 'b.php' contains some b1,b2,b3,b4 pages with urls: "http://www.a.com/b.php?page=b1" "http://www.a.com/b.php?page=b2" "http://www.a.com/b.php?page=b3" "http://www.a.com/b.php?page=b4" my requirement is i need to handle above pages in my hand and store the contents in to database. i appriciate if any body help me tom my case. this is bit urgent... Thanks for ur time., Rgds, Prasad.Ch