I have been struggling with this problem all day yesterday and hope someone might suggest a solution or a web site to where solution might be.
I want to dynamically add a ASP textbox to a Placeholder when user clicks on a button.
The following code:
txtTextBox = new TextBox();
txtTextBox.ID = "txtProduct" + strFieldNum;
PlaceHolder1.Controls.Add( txtTextBox );
creates one textbox (and not ASP textbox). On the next button click, even though the value "strFieldNum" is incrementing, the same textbox just gets refreshed. How can I change the code to make it ASP textbox and to make it add new one every time.
Any suggestions would be greatly appreciated.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham