遍历Panel1中所有label控件的Text

Arraylist values =new Arraylist//values是存储值的变量
foreach(Control a in panel1.Controls)
{
if(a is Label)
{
values.Add(a.text);
}
}




TextBox t = (TextBox)Panel1.FindControl("TextBox1");
string neir = t.Text;
posted @ 2014-02-15 16:54  914556495  阅读(840)  评论(0编辑  收藏  举报