Hi I'm trying to access the html controls that are created dynamically within an event but I'm unable to access this.
I'm using the following code to create the elements on the client side using Javascript:
function addInput(field)
{
...declaratives...
var input = document.createElement("input");
input.id = field+count;
input.name = field+count;
input.type = "text";
... remainder of the code and the element is added to the DOM...
}
I also have a server control on the page (a button called Button1), and what I want to do is when the user clicks on the button I want to look at the details in that the user has entered in the dynamically created input boxes and store them in a database. However, in the event protected void Button1_Click(object sender, EventArgs e) I can't access the input fields.
Is this possible ?
I'm using VS 2010 C# (v4.0).