遍历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;
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;