I have a user control that when a method is called dynamically adds images to an asp panel. I have placed this control in a repeater. I am using the following code to call the function. I have tried calling this function on page_load, databinding of the repeater, databinding of the item, and oninit.
foreach (RepeaterItem repit in rpter.Items)
{
MyUserControl uc = rpter.FindControl("mycontrol") as MyUserControl;
uc.MyMethod("var1","var2");
}
The method on the usercontrol gets called, however no images show up on the page or in the source view of the page. Where am I going wrong?