void DetectUserName()
    {
        SqlConnection conn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings["dbaseconnection"].ConnectionString);

        try
        {
            SqlCommand commandz = new SqlCommand("SELECT  * FROM RegisteredUsers WHERE username = '******'", conn);
            conn.Open();
            SqlDataReader drz = commandz.ExecuteReader();
            if (drz.HasRows)
            {
                while (drz.Read())
                {
                    //lnktagcategory.Text = drz[0].ToString();
                    lbldetectusername.Visible = true;
                }
            }
            else
            {
                lbldetectusername.Visible = false;
                ClassDataManager addusers = new ClassDataManager();
                addusers.Addusers(txtlastname.Text, txtfirstname.Text, txtmiddlename.Text, txtemailaddress.Text, txtuser.Text, txtpassword.Text);
                lnkLoginPage.Visible = true;
            }
        }
        catch (Exception)
        {
        }
        finally
        {
            conn.Close();
        }
    }