SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandType = CommandType.Text;
cmd.CommandText = "insert into Register values(@Username,@Password,@Conform mail,@Repeat mail,@Date of birth,@Gender,@Mobile,@Address,@Select country,@Select state,@Select city,@Security question,@Captcha image)";
cmd.Parameters.AddWithValue("@Username",TextBox1.Text.ToString());
cmd.Parameters.AddWithValue("@Password", TextBox2.Text.ToString());
cmd.Parameters.AddWithValue("@Conform mail", TextBox3.Text.ToString());
cmd.Parameters.AddWithValue("@Repeat mail", TextBox4.Text.ToString());
cmd.Parameters.AddWithValue("@Date of birth", TextBox5.Text.ToString());
cmd.Parameters.AddWithValue("@Gender", RdoGender.SelectedItem.Text.ToString());
cmd.Parameters.AddWithValue("@Mobile", TextBox7.Text.ToString());
cmd.Parameters.AddWithValue("@Address", TextBox6.Text.ToString());
cmd.Parameters.AddWithValue("@Select country", DropDownList1.Text.ToString());
cmd.Parameters.AddWithValue("@Select state", DropDownList2.Text.ToString());
cmd.Parameters.AddWithValue("@Select city", DropDownList3.Text.ToString());
cmd.Parameters.AddWithValue("@Security question", TextBox9.Text.ToString());
cmd.Parameters.AddWithValue("@Captcha image", TextBox8.Text.ToString());
con.Open();
cmd.ExecuteNonQuery();
Response.Redirect("default.aspx");
con.Close();