How to get HTML source of Webpage in C# ?
-
Hi, Can anybody help me out to get the HTML source of webpade in C#? Right now thru below code I am getting the inner code but that is not whole source which I get when I do 'view source' on webpage.... . . . ibrowser = (IWebBrowser2)pDisp; HTMLDocument idoc = (HTMLDocument)ibrowser.Document; innerHTML = idoc.documentElement.innerHTML; ...... plz do reply asap. thanks n regards, Supriya
-
Hi, Can anybody help me out to get the HTML source of webpade in C#? Right now thru below code I am getting the inner code but that is not whole source which I get when I do 'view source' on webpage.... . . . ibrowser = (IWebBrowser2)pDisp; HTMLDocument idoc = (HTMLDocument)ibrowser.Document; innerHTML = idoc.documentElement.innerHTML; ...... plz do reply asap. thanks n regards, Supriya
-
hey that prob got solved actually, thx anyway! Now I want to change the text on webpage, U can say I want to highlight particular word on webpage n display that page again. Now I m doing below thing, . . String str = internalBrowser.Document.Body.InnerText.Replace("MSN","mSn!"); internalBrowser.Document.Body.InnerText = str; ..... but when page is displayed just the text gets displayed n not the exact page or Images n all... I have one more option to parse internalBrowser.Document.Body.InnerHTML n change the word n append tag for highlighting the particular word... is it right or is there any other way???? thx Supriya Tonape