I'm having problem saving data to a local database on my program. It's doesn't store the value's inputted by the user in the User table. What could be the problem, some code and picture below.
public void addInformationToDatabase()
{
string Sex = ddlGender.Text;
string Name = tbxName.Text;
string DOB = tbxDOB.Text;
string connectionString = WebConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
SqlConnection Con = new SqlConnection(connectionString);
SqlCommand command = new SqlCommand();
command.Connection = Con;
command.CommandType = CommandType.Text;
command.CommandText = "INSERT INTO User (Gender,Name,DOB) VALUES(@Sex,@Name,@DOB)";
command.Parameters.AddWithValue("@Sex", Sex);
command.Parameters.AddWithValue("@FirstName", Name);
command.Parameters.AddWithValue("@DOB", DOB);
try
{
Con.Open();
command.ExecuteNonQuery();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
finally
{
Con.Close();
}
}
protected void btnNext_Click(object sender, EventArgs e)
{
addInformationToDatabase();
}



Any help much appreciated