Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

below is code for reading through the source code of a website but how do i say if there is any javascript in there then show 'form2'?

VB
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim pandora As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(TextBox1.Text)
        Dim response As System.Net.HttpWebResponse = pandora.GetResponse
        Dim braco22 As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream)
        Dim source As String = braco22.ReadToEnd

        TextBox2.Text = source
EndSub


p.s. i am using visual basic 2008 express

thanks in advance to any helpers
Posted
Updated 19-Aug-10 8:50am
v2

1 solution

How about a simple string search for "<script" inside the string "source"?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900