for (int i=0;i<Table1.Rows.Count;i++)
{
for (int j=0;j<Table1.Rows(i).Cells.Count;j++)
{
foreach(object aa in Table1.Rows(i).Cells(j).Controls)
{
if (aa is TextBox)
{
TextBox t1=aa;
...................................
Label1.Text=Label.Text+aa.Text+";"
....................................
}
}
}
}这样就找到了
....
if (aa is textbox)
这一句有问题啊!怎么办?
{
for (int j=0;j<Table1.Rows[i].Cells.Count;j++)
{
foreach(object aa in Table1.Rows[i].Cells[j].Controls)
{
if (aa is TextBox)
{
TextBox t1=(TextBox)aa;
...................................
Label1.Text=Label.Text+t1.Text+",";
....................................
}
}
}
}