Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to Save a Webpage as a local file in ?

Thread Tools

How to Save a Webpage as a local file in ?

Posts: n/a
How to Save a Webpage as a local file in,
eg . ,
how to save this page as a local file named by myself ?
any document about this ?

FireCrow Studio
Kylin Garden

Reply With Quote
Posts: n/a
Scrape the content from an URL and save it to a file.

In the following example, it outputs to a label.

<%@ 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 = ""
Dim objUTF8 as New UTF8Encoding()
lblHTMLOutput.Text =
objUTF8.GetString(objWebClient.DownloadData(strURL ))
End Sub

<h1>Screen Scrape of</h1>
<asp:label id="lblHTMLOutput" runat="server" />


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save a webpage contents to a file ( with LWP ) Jack Perl Misc 6 02-21-2008 12:50 AM
Clipping a remote webpage with Javascript/XPath and including in a "local" webpage soren625 Javascript 2 12-12-2006 02:09 PM
check if a webpage is forwarding to a other webpage Python 1 09-06-2005 02:27 PM
Playing a local mpeg file from a local HTML file... Lyndon HTML 1 07-25-2005 02:21 AM
Automatically save a webpage as a text file Chris Petersen Perl Misc 4 08-21-2003 02:23 AM