Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sending Data to a web server

Posted on 2002-03-06
7
Medium Priority
?
290 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 400 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

722 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