check whether username exists or not
<p>i have a registration page where when the user enters his email id, its being "verified whether he is already a registered user or not".</p>

<p>i tried writing the code in the textchange event of the textbox but it did not work.
during runtime it does not calls the textchange event of the textbox.</p>

<pre><code> obj.LocalConnection_Class(con);
    cmd = new SqlCommand();
    cmd.Connection = con;
    cmd.CommandText = "select COUNT(*) from SUBSCRIBER_MASTER where emailId ='" + txtEmail.Text + "'";
    dr = cmd.ExecuteReader();
    dr.Read();
</code></pre>

<p>can anyone tell me how can i make it work.</p>
