I am a beginner; so please include as much detail as possible with your reply.  Thank you.

On a separate post, a user went off topic (for my benefit) and explained to me that I am vulnerable to an injection attack because my code looks like the code below.  Since then, I have read a little more and have learned how to create a stored procedure.  What I don't understand is, why that's different.  In both this code and the stored procedure, I am passing in the typed text that the user enters into my two text boxes, txtUserName and txtPassword.  I would be happy to research this  more on my own, but would greatly appreciate a little help in getting started.

Sub LoginUser(s As Object, e As EventArgs)
  Dim blnAuthenticate As Boolean = Authenticate(username.Text, password.Text)
  If blnAuthenticate Then
   FormsAuthentication.RedirectFromLoginPage(username.Text, False)
   ...

Go to the complete details ...