i have a windows form in which there are controls listed below panel1 button1 = add new mobiles button2 = ok When clicking on button1 an usercontrol is added. Y
double totalSumValue = 0; foreach (Control ctrl in Controls) { if (ctrl is UserControl) { var myCrl = ctrl as UserControl; totalSumValue += Convert.ToInt32(myCrl.textbox3.Text); } } lblSumValue.text=totalSumValue.toString();