Author: saphua | Posted on: 10/30/2009 5:17:50 PM | Views : 942

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 ...