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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -