2
Answers

dr is field used as a method

adithya dugyala

adithya dugyala

16y
2.6k
1

hi folks can anyone help me
dr is field used as a method

con.Open();
            cmd = new SqlCommand("select count(*) from tblUsers where UserId='" + txtUserName.Text + "'", con);
            dr = cmd.ExecuteReader();
            int count;
            if ((dr.Read()))
            {
                count = (dr(0));
//Here im getting an error
            }
            con.Close();

            if (count > 0)
            {
               
            }
            else
            {
               }

Answers (2)