473,503 Members | 1,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Use code to set values of webform and submit

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

Nov 18 '05 #1
4 1227
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" <an*******@discussions.microsoft.com> wrote in message
news:46**********************************@microsof t.com...
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 URL
2 - Set TextField1.Value = 'Hello'
3 - Submit Form (or Click a BtnSubmit)

Any ideas how to start with this?

Thanks,
Mark

Nov 18 '05 #2
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" <an*******@discussions.microsoft.com> wrote in messag
news:46**********************************@microsof t.com..
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 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

Nov 18 '05 #3
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" <an*******@discussions.microsoft.com> wrote in message
news:46**********************************@microsof t.com...
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 URL
2 - Set TextField1.Value = 'Hello'
3 - Submit Form (or Click a BtnSubmit)

Any ideas how to start with this?

Thanks,
Mark

Nov 18 '05 #4
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" <an*******@discussions.microsoft.com> wrote in messag
news:46**********************************@microsof t.com..
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 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

Nov 18 '05 #5

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

Similar topics

2
2343
by: rked | last post by:
I get nameSPAN1 is undefined when I place cursor in comments box.. <%@ LANGUAGE="VBScript" %> <% DIM ipAddress ipAddress=Request.Servervariables("REMOTE_HOST") %> <html> <head> <meta...
1
1299
by: mjakowlew | last post by:
hi, I'm trying to pass some values from a webform into a python script. ___________________________ <html> <form action="proccessForm.py"> <p>Name: <input type="text" name="filename"/></p>...
12
4103
by: Jose Fernandez | last post by:
Hello. I'm building a web service and I get this error. NEWS.News.CoverNews(string)': not all code paths return a value This is the WebMethod public SqlDataReader CoverNews(string Sport)...
5
1200
by: Rob Meade | last post by:
Hi all, Ok - I have a bit of a problem with a login page. Originally it was written in normal asp - the page displayed the form, the user entered their details, it posted back to itself,...
2
1532
by: Mark | last post by:
Hello all - I can't seem to find what could be causing this issue so I wanted to appeal to the .NET gurus out there. When I have users input values into Page 1 and submit it, I want the ability...
3
1227
by: Harry | last post by:
Dear all, It is found that when a webform control trigger an event, Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub This...
5
36827
by: Richard Dixson | last post by:
I created a new C# web application. Basically all I am trying to do is create a table that consists of a few rows with two columns in each. And then to set those columns to text values from my...
3
1153
by: Arne | last post by:
How do I make a web form control react to a client side event in the browser THe onclick event to server based. I am looking for onclick event on the client I need something like this from a...
2
1193
by: rsht | last post by:
I am new to the ASP.Net and need some helps. In ASP, page one can have a button event "confirm()" to pop-up a yes or no window: <form ... action="page2" > .... <input onClick="confirm();">...
0
7202
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,...
0
7084
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...
0
7278
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,...
1
6991
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
7458
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...
0
5578
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,...
0
4672
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...
0
1512
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 ...
1
736
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.