Support Forums
vb.net Login to a .asp website help - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: vb.net Login to a .asp website help (/showthread.php?tid=22257)



vb.net Login to a .asp website help - Firetech - 09-19-2011

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



RE: vb.net Login to a .asp website help - Fragma - 09-19-2011

Website doesn't work for me?


RE: vb.net Login to a .asp website help - Firetech - 09-19-2011

My bad try this

https://www.gronlokke-skolen.dk/pi/Loginside.asp
https://www.gronlokke-skolen.dk/pi/


RE: vb.net Login to a .asp website help - Fragma - 09-19-2011

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/")



RE: vb.net Login to a .asp website help - Firetech - 09-19-2011

The problem is there is no ID when you work with .asp websites Smile

I fixed it now thanks for the help Smile