Hello all,
I'm having a little melt-down trying to work out how to call a method of a dynamically loaded control...
My setup is this:
Admin.aspx
CustomControl.ascx
Admin.aspx has the following code to load CustomControl.ascx:
UserControl UC = (UserControl)LoadControl("~/admin_custom_controls/howComments.ascx");
modulesPlaceHolder.Controls.Clear();
modulesPlaceHolder.Controls.Add(UC);
CustomControl.ascx has a method:
public void initiate()
{
getComments("All");
getUsers();
}
What I'm trying to do, is call the initiate() method from the Admin.aspx
Tried everything, and trawled the web for hours!!!
Help! :)