I am lousy at explaining I think. And my english ain't what it should
be.
I want to preserve/add values in a placeholder when I make my
selection. I can do this with my first dd selection like this.
- Make my selection in my drop down
- Add selection to a placeholder by clicking "btnAddSales"
aspx:
<label for="selSalesAccount">Sales Account:</label>
<asp

ropDownList Runat="server" ID="selSalesAccount"
AutoPostBack="True" />
<asp:Button Runat="server" ID="btnAddSales" />
<asp:PlaceHolder Runat="server" ID="phSales" />
code behind:
private void btnAddSales_Click(object sender, EventArgs e){
string val = this.selSalesAccount.SelectedValue;
TextBox tb = new TextBox();
tb.ID = val;
this.phSales.Controls.Add(tb);
tb.Text = val;
tb.AutoPostBack = true;
}
So now I have my first drop down selection in my placeholder. Now I
want to make another selection from my dropdown and add its value to my
placeholder (making it two values) - but when I choose a new item in
the drop down values preserved in my placeholder is gone.
How do I keep thees selected values when I do another runtrip to the
server?
(this is a simplyfied example of what I want to do, but if I can get
help with this I should be able to sort the rest out myself)
..christer