Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2010 > Visual Basic 2010 General Discussion
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Visual Basic 2010 General Discussion For any discussions about Visual Basic 2010 topics which aren't related to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2010 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 25th, 2012, 08:15 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Visual basic activate a button on a web page

Hello. New to this forum and fairly new to Visual Basic.
I am writing some VB code to automatically load and log on to a web page.
Using the web browser navigate function the following code will load the web page https://www.tomwaterhouse.com/ then enter my user name , then password and then click(submit) the login button.
My problem is that once logged on to the web page I do know how to activate the “Greyhounds” button to take me to the next page.
Any Help would be appreciated.

************************************************** ****

Public Class Form1
Dim flagg As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate("https://www.tomwaterhouse.com/")
flagg = "login"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

******* need to put code here to click Greyhounds button

End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs) Handles WebBrowser1.DocumentCompleted
If flagg = "login" Then
WebBrowser1.Document.GetElementById("UserID").SetA ttribute("Value", "UserName")
WebBrowser1.Document.GetElementById("Password").Se tAttribute("Value", "Password")
WebBrowser1.Document.GetElementById("LogonForm").I nvokeMember("submit")
End If
flagg = ""
End Sub
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic 2010 - Click a button on a website jd29 .NET 4 and Visual Studio 2010 General Discussions 7 September 28th, 2012 03:27 PM
page 154 Begining Visual Basic 2005 fergi BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 2 July 24th, 2006 04:54 PM
FTP in Visual Studio 2005 Pro (Visual Basic) shoopes VB How-To 1 June 29th, 2006 02:08 PM
Login to web portal from visual basic form Raghavendra_Mudugal VB How-To 0 December 2nd, 2004 03:10 AM



All times are GMT -4. The time now is 10:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.