Private Sub ResponseClient_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ResponseClient.Click
If txturl.Text = "" Then
Page.RegisterStartupScript("msg", "<script>alert('网址不能为空!')</script>")
Else
pageurl = txturl.Text
Dim request As WebRequest = request.Create(pageurl)
Dim response As WebResponse = request.GetResponse
Dim resStream As Stream
resStream = response.GetResponseStream
Dim rs As StreamReader
rs = New StreamReader(resStream, System.Text.Encoding.UTF8)
TextBox2.Text = rs.ReadToEnd
rs.Close()
End If
End Sub
If txturl.Text = "" Then
Page.RegisterStartupScript("msg", "<script>alert('网址不能为空!')</script>")
Else
pageurl = txturl.Text
Dim request As WebRequest = request.Create(pageurl)
Dim response As WebResponse = request.GetResponse
Dim resStream As Stream
resStream = response.GetResponseStream
Dim rs As StreamReader
rs = New StreamReader(resStream, System.Text.Encoding.UTF8)
TextBox2.Text = rs.ReadToEnd
rs.Close()
End If
End Sub