473,385 Members | 1,630 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,385 software developers and data experts.

automatically logging into a website

Is there a way I could enter a username and password in a windows form then
take that and cause it to open a website up in IE and "post" the information
to a site so i can cause that site to log in useing this information?
Nov 21 '05 #1
3 968
Hi Brain,

You can use the Web Browser control for the implementing the required
functionality.

Please refer to the following link for more details:

[How To Host a WebBrowser Control in Visual C# .NET to Post Form Data]
http://support.microsoft.com/?kbid=313068

HTH

Mona[Grapecity]
"Brian Henry" <br**********@newsgroups.nospam> wrote in message
news:Of**************@TK2MSFTNGP09.phx.gbl...
Is there a way I could enter a username and password in a windows form
then take that and cause it to open a website up in IE and "post" the
information to a site so i can cause that site to log in useing this
information?

Nov 21 '05 #2
anyway to do it with an external browser though? would be a little bit
obtrusive to write a web browser host for the control so you had back
forward etc...

"Mona" <mo**@discussions.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Hi Brain,

You can use the Web Browser control for the implementing the required
functionality.

Please refer to the following link for more details:

[How To Host a WebBrowser Control in Visual C# .NET to Post Form Data]
http://support.microsoft.com/?kbid=313068

HTH

Mona[Grapecity]
"Brian Henry" <br**********@newsgroups.nospam> wrote in message
news:Of**************@TK2MSFTNGP09.phx.gbl...
Is there a way I could enter a username and password in a windows form
then take that and cause it to open a website up in IE and "post" the
information to a site so i can cause that site to log in useing this
information?


Nov 21 '05 #3
"Brian Henry" <br**********@newsgroups.nospam> schrieb:
Is there a way I could enter a username and password in a windows form
then take that and cause it to open a website up in IE and "post" the
information to a site so i can cause that site to log in useing this
information?


Below there is a sample on how to do that with a 'WebRequest' object. I
assume that this will work with a 'POST' request too:

\\\
Imports System.IO
Imports System.Net
..
..
..
Dim wrq As WebRequest = _
WebRequest.Create("https://example.org/shop/order.jsp")
wrq.Credentials = New NetworkCredential("username", "password")
Dim wrp As WebResponse = wrq.GetResponse()
Dim sr As New StreamReader(wrp.GetResponseStream())
MessageBox.Show(sr.ReadToEnd())
sr.Close()
wrp.Close()
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4

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

Similar topics

0
by: Neil Benn | last post by:
Hello, I'm running a test and having issues with logging, if I call logging.shutdown() and then want to start the logging going again then I get a problem as if I call shutdown, I can't get the...
10
by: Thomas Heller | last post by:
I'm about to add some logging calls to a library I have. How can I prevent that the script that uses the library prints 'No handlers could be found for logger "comtypes.client"' when the script...
3
by: Brian Henry | last post by:
Is there a way I could enter a username and password in a windows form then take that and cause it to open a website up in IE and "post" the information to a site so i can cause that site to log in...
1
by: bnlockwood | last post by:
I'm researching ways in which I can create an ASPX page that will log into some of the major realtor websites with usernames and passwords and submit new listings rather then logging into each one...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.