how to make array of labels get their text from DataTable data
<p>could you please help me, I need to get data from my database and then make these data the text of labels here the code</p>

<pre><code>    protected void Button3_Click(object sender, EventArgs e)
    {
        DataTable dt = new DataTable();
        dt = DA.SelectAllProper("18");

        TableCell[] c = new TableCell[dt.Rows.Count];
        TableRow[] row = new TableRow[dt.Rows.Count];
        Label [] l=new Label[dt.Rows.Count];

        for (int i = 0; i &lt; dt.Rows.Count; i++)
        {
            l[i].Text = dt.Rows[i][0].ToString();

            l[i].Attributes.Add("style", "float:left;");
            c[i].Controls.Add(l[i]);
            row[i].Cells.Add(c[i]);

            MyCell = new TableCell();
            MyRow = new TableRow();
            Mylbl = new Label();
            Mylbl.Attributes.Add("style", "clear:both; height:5px;");
            MyCell.Controls.Add(Mylbl);
            MyRow.Controls.Add(MyCell);

            t1.Controls.Add(row[i]);
            t1.Controls.Add(MyRow);
        }


    public DataTable SelectAllProper(string m)
    {
        SqlDataAdapter sda = new SqlDataAdapter("select Name,Type from Properties where CatID =N'" + m+ "'", con);
        sda.SelectCommand.CommandType = CommandType.Text;
        DataTable dt = new DataTable();
        sda.Fill(dt);

        return dt;
    }
</code></pre>
