How can we use two queries in same click event?
<p>I used the code:</p>

<pre><code>protected void Button1_Click(object sender, EventArgs e)
{
    DataSet ds = new DataSet();
    SqlConnection con = new SqlConnection("server=kiran-b946c0f6d;
                                           uid=sa;
                                           pwd=123;
                                           database=employe");

    SqlCommand com=new SqlCommand("INSERT INTO Emplo VALUES('"+TextBox2.Text+"'",con);
    com.Parameters.Add("Email_ID", SqlDbType.VarChar);
    com.Parameters["Email_ID"].Value = TextBox2.Text;
    con.Open();

    Label3.Text = "successfully added";
    SqlDataReader reader = null;
    com = new SqlCommand("SELECT Email_ID FROM Emplo WHERE Email_ID='" 
                         + TextBox2.Text + "'", 
                         con);

    reader = com.ExecuteReader();
    if (reader != null &amp;&amp; reader.HasRows)
    {
        Label3.Text = "Emailid alraedy exist";
    }

    reader.Dispose();

    SqlDataAdapter da = new SqlDataAdapter(com);
    da.Fill(ds);

    GridView1.DataSource = ds;
    GridView1.DataBind();
    con.Close();
}
</code></pre>

<p>I intended to use Insert values in the database and if there is any duplicity,it will show the error.The duplicity is working properly.But insertion is not properly working.It will show inserted successfully.But the values are not doing insertion.</p>
