int counter = 0;
foreach (Control c in Panel1.Controls)
{
if (c is TextBox)
{
counter += Convert.ToInt32(((TextBox)c).Text);
}
}
Response.Write(counter.ToString());
沒有留言:
張貼留言