473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Programmatically navigating/"running" a webpage

Hi all,

I think this is a longshot, but is there a technique for programmatically
run a webpage?

Let's say one of our vendors has a page that we go to daily to pick up some
files. Each time, the user clicks a link, that brings up a file dialog
prompting for a local name to download to and OK's. This process is
repeated for a number of files.

I'm wondering if something like this is possible: You could have a form
hosting an MS WebControl, navigated to a page where you know the layout.
Then perhaps there might be a method exposed that would allow you to read
the text of the HTML programmatically. You could parse that to decipher
which href you need, then post the page as if that link had been clicked.

The whole idea feels very kludgy, even if it would work, but it would suit a
few purposes.

TIA,

John
Jul 21 '05 #1
3 3468
The typically way to do this is with regular expressions.
What you would do is the following:

'Create a connection to the web page
Dim wRequest As Net.HttpWebRequest =
Net.HttpWebRequest.Create("urlhere")

'Get a reference to the response object
Dim wResponse As System.Net.HttpWebResponse =
wRequest .GetResponse

'Get the web page
Dim sr As New IO.StreamReader(obj.GetResponseStream)
Dim strPage As String = sr.ReadToEnd

Then, parse the strPage variable using regular
expressions to find the correct a href tag.

Hope this helps.

Jeff Levinson

Author of "Building Client/Server Applications with
VB.NET: An Example Driven Approach"
-----Original Message-----
Hi all,

I think this is a longshot, but is there a technique for programmaticallyrun a webpage?

Let's say one of our vendors has a page that we go to daily to pick up somefiles. Each time, the user clicks a link, that brings up a file dialogprompting for a local name to download to and OK's. This process isrepeated for a number of files.

I'm wondering if something like this is possible: You could have a formhosting an MS WebControl, navigated to a page where you know the layout.Then perhaps there might be a method exposed that would allow you to readthe text of the HTML programmatically. You could parse that to decipherwhich href you need, then post the page as if that link had been clicked.
The whole idea feels very kludgy, even if it would work, but it would suit afew purposes.

TIA,

John
.

Jul 21 '05 #2
John.

Try Windows Scripting Host - I have seen complete web site test harnesses
built using this language

- peteZ

"John Spiegel" <js******@c-comld.com> wrote in message
news:uN**************@TK2MSFTNGP10.phx.gbl...
Hi all,

I think this is a longshot, but is there a technique for programmatically
run a webpage?

Let's say one of our vendors has a page that we go to daily to pick up some files. Each time, the user clicks a link, that brings up a file dialog
prompting for a local name to download to and OK's. This process is
repeated for a number of files.

I'm wondering if something like this is possible: You could have a form
hosting an MS WebControl, navigated to a page where you know the layout.
Then perhaps there might be a method exposed that would allow you to read
the text of the HTML programmatically. You could parse that to decipher
which href you need, then post the page as if that link had been clicked.

The whole idea feels very kludgy, even if it would work, but it would suit a few purposes.

TIA,

John

Jul 21 '05 #3
Thanks, guys. I'm looking into these!
"John Spiegel" <js******@c-comld.com> wrote in message
news:uN**************@TK2MSFTNGP10.phx.gbl...
Hi all,

I think this is a longshot, but is there a technique for programmatically
run a webpage?

Let's say one of our vendors has a page that we go to daily to pick up some files. Each time, the user clicks a link, that brings up a file dialog
prompting for a local name to download to and OK's. This process is
repeated for a number of files.

I'm wondering if something like this is possible: You could have a form
hosting an MS WebControl, navigated to a page where you know the layout.
Then perhaps there might be a method exposed that would allow you to read
the text of the HTML programmatically. You could parse that to decipher
which href you need, then post the page as if that link had been clicked.

The whole idea feels very kludgy, even if it would work, but it would suit a few purposes.

TIA,

John

Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Claire | last post by:
Sorry for such a daft question. Ive been following some tutorials on creating windows services. Ive not done them before. In my original debuggable windows form application, I create my worker...
2
by: Mike Kingscott | last post by:
Hi all, Ok, I'm running Windows 2000, service pack 4. I have .Net framework installed, version 1.1.4322, I'm running IIS 5.0. When I try to open a solution that was opening just dandy last week,...
3
by: gregory_may | last post by:
According to this article, I cant change "CanStop" on the fly!!! ...
3
by: John Spiegel | last post by:
Hi all, I think this is a longshot, but is there a technique for programmatically run a webpage? Let's say one of our vendors has a page that we go to daily to pick up some files. Each time,...
4
by: Mr BigSmoke | last post by:
Hi All, I'm developing a website to handle some code/application version control on a intranet. I'm using cherrypy and pysvn. Everything runs quite good but i want the user to be able to checkout...
4
by: Jono | last post by:
Hi Everyone, As it says in the title, I'm looking for a way to display a page while long running operations are performed on the server. Ideally, I'd like some way to push the current request...
5
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
Hi; How are we supposed to handle this. It appears that this must be run on a system for an ASP.NET app to run. On WinXP we are finding that the user ASPNET does not exist until this is run. ...
2
by: Javier1958 | last post by:
Hi all I have a problem running Visual Basic 2005 (.NET) programs in other computers different of that where I have Visual Studio installed. I know I have to install the .NET framework in the...
1
by: | last post by:
I've built an application that scrapes JPG images of webpages and PDF instances of those webpages automatically from an RSS feed. References to the scraped resources are persisted to our database....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.