foreach (System.Web.UI.WebControls.ListItem item in ddsize.Items)
{
if (item.Selected)
{
TextBox txt = (TextBox)Panel1.FindControl("price"+ item.Value);
} 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 price = new TextBox();
price.ID = "price" + item.Value;
//txtprice.ID = "txtprice";
Label lbl = new Label();
//lbl.ID = "lblsize";
lbl.Text = item.Text;
Panel1.Controls.Add(lbl);
Panel1.Controls.Add(price);
}
}
counter++;
}