first i create text box...
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;
Label lbl = new Label();
lbl.Text = item.Text;
Panel1.Controls.Add(lbl);
Panel1.Controls.Add(txtprice);
}
}
counter++;
foreach (ListItem item in ddsize.Items)
{
if (item.Selected)
{
TextBox text = (TextBox)Panel1.FindControl("txt_price" + item.Value);
}
}