Hello,
I am loading and adding a UserControl using the LoadControl method. However, when the loaded control makes a postback it is somehow removed.
Why is this happening and how can I fix this?
Here's the method that loads the control after a certain action. It clears a panel and then adds the loaded control to it.
public void LoadEditor(string path)
{
IEditor control = null;
control = Page.LoadControl(path) as IEditor;
control.Field = field;
EditorPanel.Controls.Clear();
EditorPanel.Controls.Add(control as Control);
EditorPanel.Visible = true;
}
IEditor is the type of the control I am loading
...
Go to the complete details ...