There was no homework portion to this assignment.
Here's the change password page from the Acme website:
The code that lies behind this page is as follows. Note that it encrypts the password before loading it into the database.
Private Sub ChangeBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangeBtn.Click
If (NewPasswordTxt.Text = "") Then
Feedback.Text = "Please enter a password..."
ElseIf (NewPasswordTxt.Text = RepeatedPasswordTxt.Text) Then
Try
Me.SqlUpdateCommand1.CommandText = "UPDATE Customers SET password='" + _
System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(NewPasswordTxt.Text, "md5") + "' " + _
"WHERE loginID='" + Session("loginID") + "'"
Me.SqlUpdateCommand1.ExecuteNonQuery()
Feedback.Text = "Password Changed for user " + Session("loginID")
Catch
Feedback.Text = Me.SqlUpdateCommand1.CommandText
End Try
Else
Feedback.Text = "Passwords must match..."
End If
End Sub