Adding TextBox Runtime in ASP.NET 2008 (C#)
-
Hello All, I have 3 Textbox on my Page and each Textbox has Text Change Event. When User input a number in first textbox say for ex 5 then 5 new textboxes are added below that Textbox and similarly it happens for other 2 textbox also. I am adding these textbox to PlaseHolder control runtime but when i click save button i have to take all the values and save back to server but I am not getting the values of textbox which I have added at runtime. How i can solve this problem please help me.. Thanks.
-
Hello All, I have 3 Textbox on my Page and each Textbox has Text Change Event. When User input a number in first textbox say for ex 5 then 5 new textboxes are added below that Textbox and similarly it happens for other 2 textbox also. I am adding these textbox to PlaseHolder control runtime but when i click save button i have to take all the values and save back to server but I am not getting the values of textbox which I have added at runtime. How i can solve this problem please help me.. Thanks.
The textbox doesn't exist, and so there's no viewstate, it's lost. Put a hidden control on your form and use js to store the text there.
Christian Graus Driven to the arms of OSX by Vista.
-
The textbox doesn't exist, and so there's no viewstate, it's lost. Put a hidden control on your form and use js to store the text there.
Christian Graus Driven to the arms of OSX by Vista.
Thanks Christian, I used Javascript and its working fine. :)