M
Michael Haberfellner
hi folks,
i do have the following problem (that nearly drives me nuts![Smile :) :)](/styles/default/custom/smilies/smile.gif)
1. within body-tags i call a void <% void_buildlist("lstService"); %>
2. this void connects to a database and creates code for a selfmade-grid
3. this is posted in the void by response.write and put on the website
up to here everything works fine!
now i added a checkbox for each gridline by adding this code to the text
created in the void in front of each gridline:
<input id=\"chkTimeDisplay" + varReader + "\" class=\"checkboxStd\"
type=\"checkbox\" name=\"chkTimeDisplay" + varReader + "\" />
4. this creates perfect checkboxes named chkTimeDisplay[+index] in every
gridline
works fine too!
5. but now i want to evaluate all checkboxes, using for example
foreach (Control locCtrl in this.Controls)
{
lblchecker.Text += locCtrl.FindControl + "; ";
if (locCtrl is CheckBox)
{
....do something
}
}
and here is the problem: no result! even if i use findcontrol with the
one correct checkboxname from the pagesource, there is no result![Frown :( :(](/styles/default/custom/smilies/frown.gif)
the controls can't be found. is it because they were produced during
runtime?
can anybody help me out?
thanx and nice greetings from vienna/austria
mike
i do have the following problem (that nearly drives me nuts
![Smile :) :)](/styles/default/custom/smilies/smile.gif)
1. within body-tags i call a void <% void_buildlist("lstService"); %>
2. this void connects to a database and creates code for a selfmade-grid
3. this is posted in the void by response.write and put on the website
up to here everything works fine!
now i added a checkbox for each gridline by adding this code to the text
created in the void in front of each gridline:
<input id=\"chkTimeDisplay" + varReader + "\" class=\"checkboxStd\"
type=\"checkbox\" name=\"chkTimeDisplay" + varReader + "\" />
4. this creates perfect checkboxes named chkTimeDisplay[+index] in every
gridline
works fine too!
5. but now i want to evaluate all checkboxes, using for example
foreach (Control locCtrl in this.Controls)
{
lblchecker.Text += locCtrl.FindControl + "; ";
if (locCtrl is CheckBox)
{
....do something
}
}
and here is the problem: no result! even if i use findcontrol with the
one correct checkboxname from the pagesource, there is no result
![Frown :( :(](/styles/default/custom/smilies/frown.gif)
the controls can't be found. is it because they were produced during
runtime?
can anybody help me out?
thanx and nice greetings from vienna/austria
mike