I've been programming in asp c# for a week or so, please bear with me.I'm trying to do a receipt generator in asp c# that looks kinda like this:
the blue button adds a new row to the table with this javascript function:\[code\]function nuevo(){$("#tablaUsuarios").append("<tr>" + "<td><select name='listaConceptos' id='listaConceptos' runat='server'></select></td>" + "<td><input name='precio' id='precio' type='text' size='15' runat='server' readonly/></td>" + "<td><input type='button' value='http://stackoverflow.com/questions/13830581/Eliminar' onclick='eliminar(this)' class='btn btn-danger eliminar'></td>"+ "</tr>")}\[/code\]However since I'm adding the controls via javascript on runtime, I have no access to them from the code behind like I would if they were DropDownList controls, adding runat="server" is also useless since at runtime I can't turn them into server controls, is there any way to access the control so I can populate, set data sources, etc. as if it were a DropDownList? Or any other way to dinamically generate and populate DDL?I thought about having a hidden DropDownList populated with all the data I need from my database, and copying all its properties to the other select controls upon creation but I don't know if it would behave like a DDL with its DataValueFields and TextFields.Any help is appreciated