Solved

Sending Data to a web server

Posted on 2002-03-06
7
281 Views
Last Modified: 2010-05-02
Hi all,
I want to connect to a site that request a user name and password fields from VB.
I want to to retrieve the next page (agetr the login page) and to do everything automatic from my VB program.
the site is a cgi site with jsp pages.
how do I do it? please send me a code example.
thanks,
Julian
0
Comment
Question by:Netsal7
7 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 6844817
use the web browser control: (Microsoft Internet Controls)

and do something like this:

Private Sub Command1_Click()
WebBrowser1.Navigate ("http://<url>")
While WebBrowser1.Busy
    DoEvents
Wend

'' obviously the "Form1" is name of form and "userName" is textbox for name and "userPass" is textbox for passwd
WebBrowser1.Document.Forms("Form1").Item("userName").Value = "<userName>"
WebBrowser1.Document.Forms("Form1").Item("userPass").Value = "<userPass>"
WebBrowser1.Document.Forms("Form1").Submit

MsgBox WebBrowser1.Document.body.innerHTML

End Sub
0
 
LVL 18

Accepted Solution

by:
bobbit31 earned 100 total points
ID: 6844820
repost so it looks nicer

Private Sub Command1_Click()
WebBrowser1.Navigate ("<url>")
While WebBrowser1.Busy
   DoEvents
Wend

'' obviously the "Form1" is name of form and "userName" is textbox for name and "userPass" is textbox
for passwd
WebBrowser1.Document.Forms("Form1").Item("userName").Value = "<userName>"
WebBrowser1.Document.Forms("Form1").Item("userPass").Value = "<userPass>"
WebBrowser1.Document.Forms("Form1").Submit

MsgBox WebBrowser1.Document.body.innerHTML

End Sub
0
 

Author Comment

by:Netsal7
ID: 6847176
and id the site uses SSL?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 17

Expert Comment

by:inthedark
ID: 6847202
Do you need a visual inteface or are you making a background DLL/Service?
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6847448
the above code doesn't work for a site using ssl?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7610504
Hi Netsal7,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept bobbit31's comment(s) as an answer.

Netsal7, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:modulo
ID: 7657345
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now