populate browser-page controls on client-side

  • Thread starter Thread starter John A Grandy
  • Start date Start date
J

John A Grandy

is it possible to write a vb.net code (intended to run on the client-side)
that would invoke an instance of IE, have it download a page from a certain
URL, and then pre-populate some of the controls on that page, before
transferring focus to the browser-page and showing it to the user? (the
user would be responsible for submitting the page.)
 
javascript:window.open(....) -> prepopulate the new page on the server side
ie use an aspx page.

remember that even though asp.net is far smarter than the older cgi apps,
all processing is done server side. Anything that is required on the client
side, you will need to do with client side script

Jody
MCSD.Net
 
Hi Jody. Thanks for the response.

I think perhaps you misunderstood my question.

What I am attempting to do *can not* involve server-side code nor
client-side script .... I have no control over the coding of the
web-application.

I need to write a client-side executable in VB.NET that emulates actions a
user would manually perform when interacting with a browser-page.

This VB.NET EXE would triggers download of a web-page (from a specific URL)
into a browser, then populate some of the controls on the browser-page, but
not submit the page -- just pass it over to the end-user so that they can
finish populating the other controls and submit it themselves.
 
That does sound like a lot of fun....

OK so if we are working in a vb windows app. obviously the first thing that
you will want to do is open your initial page in a web browser control (you
can keep it hidden at first if you want). I must assume that you know what
fields you want to populate... I am pretty certain that you can just do
something like wbrowser1.document.getElementById("...").value = "test"

The only problem that I can see is that there may be permission issues -
this is generally the case when working with cross site frames etc. so you
may have to actually download and save the file to the hard drive first??

Give it a try a let me know how you go...

Cheers
Jody
 
Hmmm ... interesting ...

So VB.NET code can be written to populate objects exposed by the DOM of a
browser-page ...

So would such a control population display instantly? I assume that the
actual web-page file is not being altered, so no point triggerring a
refresh-from-cache ...
 
Not sure how instantly it would happen, but if you weren't entering too much
data, it should be quick enough for the user not to notice. VB.Net has all
the functionality plus more compared to something like vb6 - remember that a
lot of the complex functions that we used call up were simply COM controls
or libraries, these are still available if you need them through the
marshalling libraries in .NET

The other other option is to look at reading the DOM tree and retrieving the
field names then using inet or something to actually post the form data to
the site? - not quite as messy and may work a bit better.

Jody
 
Back
Top