On Keypress event you can implement the below code but this is not a good approach because
on every keyPress you are hitting the database which cause your application performance.
If you really want to do this then can apply this change on Textbox leave event or provide a button to check from database. Use the following code to achieve:
SqlConnection sqlConn = new SqlConnection(ConnectionString);
SqlCommand sqlComd = new SqlCommand("StoreProcedure", sqlConn);
sqlComd.Parameters.Add("@Name", SqlDbType.VarChar).Value = textBox.text;
Conn.Open();
SqlDataReader dataReader = sqlComd.ExecuteReader();
if (DR1.Read())
{
textBox.Text = dataReader.GetValue(0).ToString();
}
sqlConn.Close();