Ok, basically I don't understand this and know I am missing something simple.
I want to hash a password and save it in an access table. I can only find code for sqldatasource!
This is what I've hacked out so far....
'Sub to hash password on user creation
Sub Detailsview1_ItemInserting(Byval sender As Object , ByVal e As DetailsViewInsertEventArgs)
Dim sqlcmd = "INSERT ALL INTO Usertable (UserName, FirstName, Surname, Password, EmailAddress, RoleID) VALUES (@UserName, @FirstName, @Surname, @Pass, @EmailAddress, @RoleName)"
Dim txtPassword As TextBox = DetailsView1.FindControl("Password")
adsUser.InsertParameters("Pass").DefaultValue = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "SHA1")
adsUser.InsertCommand = sqlcmd
End Sub
My AccessDataSource/detailsview are as follows:
<as ...
Go to the complete details ...