c# - Find what Elements were added by Javascript -
i have got asp-site, enables user add label-elements. don’t know how many labels added or id have. know only, within panel pnl_added. after user has added labels, pushes send-button update.
so, @ server, awaiting postback, don’t know where, when , how find out, elements added pnl_added. can me?
i have tried that:
protected void page_load(object sender, eventargs e) { [...] (int = 0; < pnl_added.controls.count; i++) { [...] } [...] }
but think late because of loaded viewstate? possible?
i working vs 2013, asp c#, .net framework 4.
on server, controls tree doesn't created actual client html. actually, server doesn't know client html besides input
tags values in scope of submitted form. in general, controls available in page_load
method, created on server side aspx
file markup.
to implement scenario, need add hidden field each label, added client , save label's inner text hidden field's value. you'll can these labels texts below:
var labels = request.form["hiddenfield's name"] string[];
Comments
Post a Comment