Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello everyone...

i'm getting crazy trying to understand how to build a vb code that return the full source code of a website...

 

I've actually builted a BHO that show the source code of a all the web pages that I surf in the InternetExplorer but for doing so I've used "Ie.document.body.outerhtml" and it doesn't show all of the source code as seen in notepad when clicking "view source"...

 

Is there any way to show all of the code...?

 

p.s. The site is rendering different code for each time you load it so having other software/activeX/dll load the same site is not possible....

It must be a way that just show all the code like it is seen in notepad but without loading the site again...

 

Please HELP me with this...

Posted (edited)
you need to use the Document.documentElement.InnerHtml / Document.documentElement.OuterHtml not the body.outerhtml

 

 

thanks... but now I've tried both and the line that is in the notepad isn't in my textbox yet...

Is there any other way?

maybe even to retrieve the tmp file saved by IE... if the file name can be found... or Silent saving of the document...

can't find a code for saving without prompting the user...

Edited by amiads
  • Leaders
Posted

I use this to get the HTML of a file.

 

'Can't tell if you are using VB or C#
       Dim wrq As System.Net.WebRequest = System.Net.WebRequest.Create(Url)
'Clicked on the site link...
           Dim wrp As System.Net.HttpWebResponse = DirectCast(wrq.GetResponse(), System.Net.HttpWebResponse)
'Receiving info about site file.
           Dim sr As New System.io.StreamReader(wrp.GetResponseStream)
'Read site information.
           Dim Text As String = sr.ReadToEnd()
'Put into Text variable.
           sr.Close()
           wrp.Close()

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...