Use code to set values of webform and submit

G

Guest

Hello All
I'm trying to have a .Net app open up a web form, enter values into a text field (given the ID or Name), and submit. Ideally I could program something like
1 - Request Page given UR
2 - Set TextField1.Value = 'Hello
3 - Submit Form (or Click a BtnSubmit

Any ideas how to start with this

Thanks
Mar
 
K

Kevin Spencer

Your question is somewhat confusing. The purpose of a form is to provide an
interface for a human to be able to input data. If you want your program to
do something with data, it certainly doesn't need a WebForm to do it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Mark said:
Hello All,
I'm trying to have a .Net app open up a web form, enter values into a text
field (given the ID or Name), and submit. Ideally I could program something
like:
 
G

Guest

Hey Kevin
I see what you're saying. Two things (1) This would allow me to make unit tests for WebForms (especially for presentation layer issues), and (2) This would assist with a screen-scraping task I'm trying to do

I know it's an abnormal request... but despite that do you have any insight where to start

Thanks
Mar

----- Kevin Spencer wrote: ----

Your question is somewhat confusing. The purpose of a form is to provide a
interface for a human to be able to input data. If you want your program t
do something with data, it certainly doesn't need a WebForm to do it

--
HTH
Kevin Spence
..Net Develope
Microsoft MV
Big things are made u
of lots of little things

Mark said:
Hello All
I'm trying to have a .Net app open up a web form, enter values into a tex
field (given the ID or Name), and submit. Ideally I could program somethin
like
 
B

bruce barker

you need a hltm parser to parse the web form html.

the easiest way to due this is host IE, and capture its events (page load,
unload, etc). once a page has loaded, you can access the dom to finf/set
field values.

-- bruce (sqlwork.com)


Mark said:
Hello All,
I'm trying to have a .Net app open up a web form, enter values into a text
field (given the ID or Name), and submit. Ideally I could program something
like:
 
G

Guest

Hello
I can already parse the HTML file, and I know exactly which field (Id and Name) to modify

With that, what do you mean by "you can access the dom to finf/setfield values"

Is there webpage that expands on that

Thanks
Mar

----- bruce barker wrote: ----

you need a hltm parser to parse the web form html

the easiest way to due this is host IE, and capture its events (page load
unload, etc). once a page has loaded, you can access the dom to finf/se
field values

-- bruce (sqlwork.com


Mark said:
Hello All
I'm trying to have a .Net app open up a web form, enter values into a tex
field (given the ID or Name), and submit. Ideally I could program somethin
like
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,151
Latest member
JaclynMarl
Top