Re: how to retrieve control value from dynamically created controls
- From: "Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@xxxxxxxxxxxx>
- Date: Thu, 21 Jun 2007 18:24:34 +0300
2 points:
1. You need to re-create dynamically created controls on every postback,
preferably in Page_Init event.
2. Controls property contains only immediate children. You need to drill
down row-cell-checkbox.
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Dica" <genpub5@xxxxxxxxxxx> wrote in message
news:qwwei.6056$xk5.1118@xxxxxxxxxxx
i've got a script that creates a new tablerow + tablecell and appends that
to a non dynamically created table control. a new row is added for each
recordset returned from my sql statement. within each tablecell, i place a
dynamically created checkbox control. i now need to fetch back the value
of the checkbox as follows:
foreach (Control c in tblServices.Controls) {
}
this doesn't work, however. if i step through with the debugger, the only
controls listed under tblServices are the tablerows, not the checkbox.
how do i navigate down to the checkbox control so i can fetch the value?
tks.
.
- Follow-Ups:
- References:
- Prev by Date: How can I use " ProfileCommon" class in MyWebsiteCore.dll,Is That possible?
- Next by Date: Re: Center web page info
- Previous by thread: how to retrieve control value from dynamically created controls
- Next by thread: Re: how to retrieve control value from dynamically created controls
- Index(es):
Relevant Pages
|