473,804 Members | 4,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Programmaticall y navigating/"running" a webpage

Hi all,

I think this is a longshot, but is there a technique for programmaticall y
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 programmaticall y. 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 3516
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.HttpWebRequ est =
Net.HttpWebRequ est.Create("url here")

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

'Get the web page
Dim sr As New IO.StreamReader (obj.GetRespons eStream)
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 programmaticall yrun 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 programmaticall y. 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******** ******@TK2MSFTN GP10.phx.gbl...
Hi all,

I think this is a longshot, but is there a technique for programmaticall y
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 programmaticall y. 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******** ******@TK2MSFTN GP10.phx.gbl...
Hi all,

I think this is a longshot, but is there a technique for programmaticall y
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 programmaticall y. 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
1641
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 classes. The classes 'run' themselves using several threads and only stop when the form is closed. Now I've used these worker classes in the service application. When I try to run my service manually, I am given a message that the service stopped...
2
1896
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, I get the error "Visual Studio .NET has detected that the specified Web server is not running ASP.NET version 1.1" I HAVE ALREADY TRIED RUNNING aspnet_regiis -i (SEVERAL TIMES) WITH *NO* LUCK
3
1890
by: gregory_may | last post by:
According to this article, I cant change "CanStop" on the fly!!! http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemserviceprocessservicebaseclasscanstoptopic.asp So, how can I enable/disable the ability for a user to kill my service (Via Task Manager) on the fly? I would prefer not to tweak the regestry settings that permit Task manager from be available to a user. I have not had good luck down...
3
349
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, 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.
4
1841
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 some projects from the server. The user(on the client side) selects a folder in his machine (i.e.: C:\Project1) and the server should checkout (download/copy) all the project selected to the client machine. But what happens is that the webserver...
4
3272
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 onto some stack, where it would continue to be processed asynchronously (most importantly preserving things like view state, form post data, etc). In the interim, while the main request is processed, a friendly page will be displayed to the user....
5
2836
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. However, running this impacts all existing ASP.NET apps and sets the default ..NET for all new ones. So if we run this we can screw up all the ASP.NET apps already on a system.
2
1303
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 other computers and so I did. I don't have problems with simple programs. They run nicely. The problem is with programs that use Excel files. In fact with just adding Imports Microsoft.Office.Interop.Excel to the program hampers it of running in...
1
2239
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. I've also built an administrative interface that allows someone to scroll through a datalist of the JPG images of the page and to delete the unwanted items. The JPG previews of the webpage are rendered in several sizes: iconic, mid-sized 600px...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10319
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10076
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9144
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4297
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.