Jun 21, 2012, 8:37 AM
Capturing panel contentcontrols on directevents or directmethods returns 0
Guys,
I was able to add usercontrol to panel using the below:
I was able to add usercontrol to panel using the below:
protected override void OnLoad(EventArgs e)
{
Control control = (Control)this.LoadControl(attribute.Path);
this.FormatParamControlPanel.ContentControls.Add(control);
this.FormatParamControlPanel.UpdateContent();
}
But when i try to capture the control on a directevents or directmethods the contentconttrols.count is always =0 protected void InsertFormat(object sender, DirectEventArgs e)
{
Control ctl=FormatParamControlPanel.Controls[0];??? exception
}
[DirectMethod]
public void InsertFormat()
{
Control ctl=FormatParamControlPanel.Controls[0];exception ???
}
Any ideas?