473,651 Members | 3,063 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.Valu e = 'Hello
3 - Submit Form (or Click a BtnSubmit

Any ideas how to start with this

Thanks
Mar

Nov 18 '05 #1
4 1232
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*******@disc ussions.microso ft.com> wrote in message
news:46******** *************** ***********@mic rosoft.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.Valu e = '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*******@disc ussions.microso ft.com> wrote in messag
news:46******** *************** ***********@mic rosoft.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.Valu e = '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*******@disc ussions.microso ft.com> wrote in message
news:46******** *************** ***********@mic rosoft.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.Valu e = '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*******@disc ussions.microso ft.com> wrote in messag
news:46******** *************** ***********@mic rosoft.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.Valu e = '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
2363
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 http-equiv="Content-Type" content="text/html;
1
1305
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> <p>Email: <input type="text" name="title"/></p>
12
4119
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
1207
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, validated them and then posted on again (using a form) to the relevant applications - sending with it a session id from SQL server. What I need to do at the moment is create a second stage to this and in
2
1540
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 so that the user can navigate back from Page 2 (through clicking the "Back" button) and the values they just put in (text boxes) or selected (listboxes) are retained. Right now, though, the page is completely cleaned to blank and the user ends up...
3
1228
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 function will be load first, followed by
5
36850
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 code behind. However I am not able to do this at all, I am going about this wrong, I think and need guideance. If this was just straight HTML I would do this: <table> <tr><td>field 1</td><td>value 1 set by code behind</td></tr>
3
1163
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 webform button control <input type=button onclick="return OK()>"><script language="javascript" function OK( return confirm("Delete News Item. OK?") </script But I need the server event also.
2
1201
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();"> </form> and if user click yes to onfirm, the function can have form.submit to post the form values to page2
0
8807
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8701
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
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,...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5615
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
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
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
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.