473,322 Members | 1,690 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,322 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 3463
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.