<%@ Import Namespace="System.Net" %>
<script language="VB" runat="server">
Sub Page_Load(sender as Object, e as EventArgs)
'STEP 1: Create a WebClient instance
Dim objWebClient as New WebClient()
'STEP 2 and 3
Const strURL as String = "http://www.yahoo.com/"
Dim objUTF8 as New UTF8Encoding()
lblHTMLOutput.Text = objUTF8.GetString(objWebClient.DownloadData(strURL))
End Sub
</script>
<html>
<body>
<h1>Screen Scrape of www.yahoo.com</h1>
<p>
<asp:label id="lblHTMLOutput" runat="server" />
</body>
</html>
|