Reputation: 43
I have a Visual Basic Application where I'm trying to log into live.com, it consists of two textboxes (1 for user, 1 for pass) a submit button, and a webbrowser. I have the URL of the webbrowser set to live.com (so I can log in) and then I have this code entered in for btnLogin (login button)
WebBrowser1.Document.GetElementById("login").SetAttribute("value", txtUsername.Text)
WebBrowser1.Document.GetElementById("passwd").SetAttribute("value", txtPassword.Text)
WebBrowser1.Document.GetElementById("SI").InvokeMember("submit")
Now, as I hit submit the info is entered in, but the page just seems to refresh (not sure), but it doesn't seem like the information is submitted in. Now also let me explain the code a bit, the names login, passwd, and SI all come from live.com. So I believe this is the HTML submit button code on live.com
<input type="submit" name="SI" id="idSIButton9" value="Sign in" class="default">
But when I put in the name SI, it doesn't seem to submit. If anyone can help me that would be GREAT. Thank you.
Upvotes: 0
Views: 307