A
Anders K. Jacobsen [DK]
Hi
I have this that adds some usercontrol (UCTodays.ascx) to a placeholder
foreach(A a in B){
UCTodays ucline = (UCTodays )LoadControl("UCTodays.ascx");
ucline.Initializecontrol(line,alternate);
Placeholder1.Controls.Add(ucline);
}
On the mainpage i have a save button when pressed much call the add
usercontrol´s SaveValues() method which of course is public.
If I had manually added the controll then this would be easy. But how do i
get access the controls added? I dont now their id. I have tried
Page.findcontrol("_ctl0") etc. but I dont get the usercontrol.
I have also tried to retain a collection of references to the usercontrols
added but when I call these references i get a usercontrol which contains
the oldvalues before postback.
Can´t i do this?
Anders, Denmark
I have this that adds some usercontrol (UCTodays.ascx) to a placeholder
foreach(A a in B){
UCTodays ucline = (UCTodays )LoadControl("UCTodays.ascx");
ucline.Initializecontrol(line,alternate);
Placeholder1.Controls.Add(ucline);
}
On the mainpage i have a save button when pressed much call the add
usercontrol´s SaveValues() method which of course is public.
If I had manually added the controll then this would be easy. But how do i
get access the controls added? I dont now their id. I have tried
Page.findcontrol("_ctl0") etc. but I dont get the usercontrol.
I have also tried to retain a collection of references to the usercontrols
added but when I call these references i get a usercontrol which contains
the oldvalues before postback.
Can´t i do this?
Anders, Denmark