Unanswered: How to add record from ASP.NET to SQL Server
I hope you all have a good holidays but not me. I am having problem with web form which I want it to post data into SQL server when user click on the button. I don't know what is "Wrong" with my sorry code!!! It bugged me for 4 days now. Can any one please point out what I did wong here: ( the following code is attached to button_click of server button control)
Dim myConnection As SqlConnection = New _
Dim cmdNewUser As New SqlCommand()
cmdNewUser.Connection = myConnection
cmdNewUser.CommandText = "INSERT INTO UserInfo_T " & _
"(ULastname, Ufirstname, email, Agency, Address, City, State, zip, Phone, LoginName, Password, IsAdministrator) " & _
"VALUES (@ULastname, @Ufirstname, @email, @Agency, @Address, @City, @State, @zip, @Phone, @LoginName, @Password);"