Posted on: 5/2/2011 1:37:50 AM | Views : 252

Hi
I followed a tutorial on this site regarding forms authentication. The code i ended up with looks like this (It's Visual Basic by the way):
Dim UserNameCollection() As String = {"Username"} Dim PasswordCollection() As String = {"password"} For Iterator As Integer = 0 To UserNameCollection.Length - 1 Dim UserNameIsValid As Boolean = (String.Compare(loginName.Text, UserNameCollection(Iterator), True) = 0) Dim PasswordIsValid As Boolean = (String.Compare(loginPassword.Text, PasswordCollection(Iterator), False) = 0) If UserNameIsValid AndAlso PasswordIsValid Then FormsAuthentication.RedirectFromLoginPage(loginName.Text, True)
Now, this works like a charm, but I find i rather unpractical to manually add every single user. So my question is:
How do I populate the UserNameCollection and the PasswordCollection from a MySQL database?
 
< ...

Go to the complete details ...