473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to autofill a web login page and autosubmit?

I have a login.aspx page consisting of a username label and textbox,
password label and textbox and a submit button.

I want to programmatically autofill this and post it back.

I am using the ActiveX IE/Browser object to navigate to the windows page
However, I'm unsure of how to post the info back to the server.

Any suggestions are welcome.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #1
4 4887
Morten,

If you are using the WebBrowser object, then in the Navigate method,
there is a parameter which will take the extra information to post to the
server. It is here that you would set the username and the password to
whatever you would fill in on the label. This would also require you to use
a POST method, as opposed to a GET method (well, depending on the form
anyways).

Also, are you using .NET on the client side? Have you considered using
the HttpWebRequest and HttpWebResponse classes?

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Morten Wennevik" <mo************@hotmail.com> wrote in message
news:opru6ihcqrge0n9a@localhost...
I have a login.aspx page consisting of a username label and textbox,
password label and textbox and a submit button.

I want to programmatically autofill this and post it back.

I am using the ActiveX IE/Browser object to navigate to the windows page
However, I'm unsure of how to post the info back to the server.

Any suggestions are welcome.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Nov 15 '05 #2
On Mon, 8 Sep 2003 08:40:54 -0400, Nicholas Paldino [.NET/C# MVP]
<ni**************@exisconsulting.com> wrote:
Morten,

If you are using the WebBrowser object, then in the Navigate method,
there is a parameter which will take the extra information to post to the
server. It is here that you would set the username and the password to
whatever you would fill in on the label. This would also require you to
use
a POST method, as opposed to a GET method (well, depending on the form
anyways).

I've tried setting postData =
"__VIEWSTATE=xxx...&Username=myname&Password=mypas sword"
xxx... is the viewstate number
but I'm unsure of how to use postData. Also how would I use POST/GET?
The server is using sessionstates so I'm assuming I need to include
viewstate.
Also, are you using .NET on the client side? Have you considered using
the HttpWebRequest and HttpWebResponse classes?

I am using C# in Visual Studio.Net, so... yes :)
I have used WebRequest/Response in a regular web browser app, but I'm not
too familiar with it.
Hope this helps.


Thanks
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #3
Morten,

I would suggest using the HttpWebRequest and HttpWebResponse classes if
you don't need to display the content that you download. It will give you
more control and better performance.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Morten Wennevik" <mo************@hotmail.com> wrote in message
news:opru6m1qlkge0n9a@localhost...
On Mon, 8 Sep 2003 08:40:54 -0400, Nicholas Paldino [.NET/C# MVP]
<ni**************@exisconsulting.com> wrote:
Morten,

If you are using the WebBrowser object, then in the Navigate method,
there is a parameter which will take the extra information to post to the server. It is here that you would set the username and the password to
whatever you would fill in on the label. This would also require you to
use
a POST method, as opposed to a GET method (well, depending on the form
anyways).


I've tried setting postData =
"__VIEWSTATE=xxx...&Username=myname&Password=mypas sword"
xxx... is the viewstate number
but I'm unsure of how to use postData. Also how would I use POST/GET?
The server is using sessionstates so I'm assuming I need to include
viewstate.
Also, are you using .NET on the client side? Have you considered using
the HttpWebRequest and HttpWebResponse classes?


I am using C# in Visual Studio.Net, so... yes :)
I have used WebRequest/Response in a regular web browser app, but I'm not
too familiar with it.
Hope this helps.


Thanks
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

Nov 15 '05 #4
Thanks, I tried using httpwebrequest/httpwebresponse, but I can't seem to
get redirects.

On Mon, 8 Sep 2003 09:31:07 -0400, Nicholas Paldino [.NET/C# MVP]
<ni**************@exisconsulting.com> wrote:
Morten,

I would suggest using the HttpWebRequest and HttpWebResponse classes if
you don't need to display the content that you download. It will give
you
more control and better performance.


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #5

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

Similar topics

0
by: Chris Sharman | last post by:
I'd like to design my pages to work cooperatively with browser autofill features. I've loked around, but can't find any good documentation on supported/unsupported field names...
1
by: shortbackandsides.no | last post by:
I'm having a lot of difficulty trying to persuade the Google toolbar autofill to act consistently, for example ======================= <html><head> <title>autofill test</title> </head><body>...
0
by: David Portabella | last post by:
Hello, I am a doing a survey about Autofill Web Forms softwares. Usually, they all collect information of the user once during the set-up phase (user knowledge base). Then, when the user...
3
by: Anks | last post by:
Hi All, A user can control the AutoFill option by enabling / disabling the Remember Passwords option in Options - Privacy - Saved Passwords section. But is it possible to disable this option...
2
by: Andre Ranieri | last post by:
I'm retouching our corporate web site that, among other things, allows customers to log in and pay their invoices online. I noticed that on the checkout page, the credit card number textbox...
3
by: fischertm | last post by:
Does anyone know where to find code to use Autofill to add user names and passwords into a login screen. For example: We would like to use Single Sign on in SharePoint Portal server, but need to...
1
by: Rissoman | last post by:
Hello, I have an issue were I have a zipcode textbox in an atlas ajax updatepanel. When you tab out of the zip textbox and the shipping is calculated. I know this works perfect! Then a user...
5
RMWChaos
by: RMWChaos | last post by:
I am working on a script to create and remove DOM elements, and I want to make it as efficient as possible (no redundancies). Because DOM elements each have their own set of attributes, the function...
1
by: berlich | last post by:
Can I use visual basic.net to access the DOM in a web page so that I can autofill the text boxes? If so, can you point me in the right direction as to where to begin? I need to fill in a lengthy...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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...

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.