Double click on your pin code textBox, and type this code:-
protected void Pin_Code_TextChanged(object sender, EventArgs e)
{
if (Pin_Code.Text.Length == 5)
{
SqlCommand cmd = new SqlCommand("select * from Customer_Master where CustomerCode=" + Pin_Code.Text, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
cmd.ExecuteNonQuery();
con.Close();
DataSet ds = new DataSet();
da.Fill(ds);
Consignor_Code.Text = ds.Tables[0].Rows[3][1].ToString();
Consignor_Name.Text = ds.Tables[0].Rows[4][2].ToString();
Consignor_Address.Text = ds.Tables[0].Rows[0][3].ToString();
Pin_Code.Text = ds.Tables[0].Rows[0][4].ToString();
City.Text = ds.Tables[0].Rows[0][5].ToString();
State.Text = ds.Tables[0].Rows[0][6].ToString();
Phone.Text = ds.Tables[0].Rows[0][7].ToString();
Email_id.Text = ds.Tables[0].Rows[0][8].ToString();
}
}
You can remove the button..
I hope this will help you..