Hello there im having problem whenever i press the refresh button it keeps adding :/ how do i prevent it? its been my day 2 figuring this out and i failed \[code\]protected void Button1_Click(object sender, EventArgs e) { //Instantiate the connection with the database using (SqlConnection myConnection = new SqlConnection("user id=username;" + "password=password;" + "trusted_connection=yes;" + "database=DataBaseConnection;" + "connection timeout=30;")) { //Open the Connection object myConnection.Open(); //Instantiate a SQL Command with an INSERT query SqlCommand myCommand = new SqlCommand("INSERT INTO BasicInfo (Firstname,Surname) Values(@a,@b);", myConnection); if (TextBox1.Text !=null && TextBox2.Text != null) { //Texbox myCommand.Parameters.AddWithValue("@a", TextBox1.Text); myCommand.Parameters.AddWithValue("@b", TextBox2.Text); //Execute the query myCommand.ExecuteNonQuery(); } else { //Code HEre? }\[/code\]