protected void ddsize_SelectedIndexChanged(object sender, EventArgs e) { if (counter > 1) return; foreach (ListItem item in ddsize.Items) { if (item.Selected) { Panel1.Visible = true; TextBox txtprice = new TextBox(); txtprice.ID = "txt_price" + item.Value; txtprice.Width = 30; //txtprice.ID = "txtprice"; Label lbl = new Label(); //lbl.ID = "lblsize"; lbl.Text = item.Text; Panel1.Controls.Add(lbl); Panel1.Controls.Add(txtprice); } } counter++;
Attachment: insert.rar