O
Oleg Ogurok
Hi all,
Does anyone have example of adding controls on the client side (DHTML)
and then persisting them as ASP.NET server controls on the server side?
For example, a page has an <input> box for entering e-mail address and
a button <Add more addresses>.
Each time a user clicks the button, another textbox is created via
JavaScript:
var tb = document.createElement("input");
tb.type = "text";
container.appendChild(tb);
When the user submits the page to the server, the ASP.NET engine should
somehow recreate all newly added controls (e.g. populate this.Controls
collection in CreateChildControls()) and restore their values.
I haven't been able to figure out how to restore values into the
controls
Any help/samples appreciated.
-Oleg.
Does anyone have example of adding controls on the client side (DHTML)
and then persisting them as ASP.NET server controls on the server side?
For example, a page has an <input> box for entering e-mail address and
a button <Add more addresses>.
Each time a user clicks the button, another textbox is created via
JavaScript:
var tb = document.createElement("input");
tb.type = "text";
container.appendChild(tb);
When the user submits the page to the server, the ASP.NET engine should
somehow recreate all newly added controls (e.g. populate this.Controls
collection in CreateChildControls()) and restore their values.
I haven't been able to figure out how to restore values into the
controls
Any help/samples appreciated.
-Oleg.