Support Forums

Full Version: vb.net Login to a .asp website help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been trying to make a program that automatticly login to my schools website and this si the code I tried so far

Schools website - "http://gronlokke-skolen.dk/pi/Loginside.asp"

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        WebBrowser1.Navigate("http://gronlokke-skolen.dk/pi/")
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        WebBrowser1.Document.GetElementById("Brugernavn").SetAttribute("value", TextBox1.Text)
        WebBrowser1.Document.GetElementById("Adgangskode").SetAttribute("value", TextBox2.Text)

    End Sub
End Class
Website doesn't work for me?
EDIT:

You're missing the "s" in http when navigating to the page.

So it would be:

Code:
WebBrowser1.Navigate("https://gronlokke-skolen.dk/pi/")
The problem is there is no ID when you work with .asp websites Smile

I fixed it now thanks for the help Smile