protected void txtUsername_TextChanged(object sender, EventArgs e)
 {
     if (objStudent.IsDuplicateUsername(txtUsername.Text, 0))
     {
         lblDuplicateUsername.Visible = true;
         txtUsername.Text             = "";
         txtUsername.Focus();
     }
     else
     {
         lblDuplicateUsername.Visible = false;
     }
 }
Esempio n. 2
0
    protected void txtUsername_TextChanged(object sender, EventArgs e)
    {
        int StudentId = 0;

        if (Request.QueryString["StudentId"] != null)
        {
            StudentId = Convert.ToInt32(Request.QueryString["StudentId"]);
        }

        if (objStudent.IsDuplicateUsername(txtUsername.Text, StudentId))
        {
            lblDuplicateUsername.Visible = true;
            txtUsername.Text             = "";
            txtUsername.Focus();
        }
        else
        {
            lblDuplicateUsername.Visible = false;
        }
    }