SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["conn"]);
        conn.Open();
        SqlCommand cmd = new SqlCommand("select * from userreg",conn);
        SqlDataReader ds = cmd.ExecuteReader();
        if (ds.Read())
        {
            while (ds.Read())
            {
                Label1.Text += ds["username"].ToString()+"<br>";
            }
        }
        else
        {
            Label1.Text = "暂无用户在本站注册!";
        }
        conn.Close();
输入结果,本来我表有4条数据,输出来只能输出3条,找了一天还没找出原因,我试了用for循环可以全部输出来也就是4条数据,大侠们帮我想想,在下3Q