ASP.net Web Forms - Dynamic Form - C# -
i need create form dynamically using querystring parameter , access of fields id in code behind.
now, have form (with server controls) can't set unique ids (using things eval...) passed server controls simple html , fields have unique ids can't access them code behind (form.findcontrol works server controls).
this code html:
<% int j = convert.toint32(request.querystring["j"]); (int = 0; < j; i++) { %> <div> <div> <input type="date" id='<%: "date_" + (i + 1).tostring() %>' /> </div> </div> <% } %>
if impossible set ids server controls (if not, tell me how!) how can access fields? or how can create form using else can helps me?
thanks in advice.
since these controls posted upon form submission , need values after postback
, can access using request.form["date_0"]
, request.form["date_1"]
, request.form["date_2"]
....
Comments
Post a Comment