I have a register page that saves the data to a database the only problem is when I click the register button I am getting an error which im not too sure how to solve, please see below.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your declaring
param[]to have 6 elements, but you’re only using 5. The last one isnullso you’re getting the error on the last iteration of your for loop where you add the elements to theSqlParameterCollection.It would be much cleaner/easier to do the following rather than declaring an array, filling the array, and then trying to copy the array: