Beispiel #1
0
        protected void FillData()
        {
            SqlConnection  con = new SqlConnection(connectionstring);
            SqlCommand     cmd = new SqlCommand("select EmployeeId,EmployeeName,EmployeePhoneNumber from Employee", con);
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            DataTable      dt  = new DataTable();

            sda.Fill(dt);
            EmployeeView.DataSource = dt;
            EmployeeView.DataBind();
        }