Author: gege107 | Posted on: 10/1/2008 1:04:29 AM | Views : 449

Hi,

 I'm struggling to get this working.

I have a aspx page that loads controls at run time using:

ControlContainer.Controls.Add(LoadControl("/test.ascx"));

tst.ascx has:

<asp:Literal runat="server" ID="myTest">ControlBox Content</asp:Literal>

test.ascx.cs

public partial class test : BaseControl{
   protected override void LoadPage() 
   myTest.Text= "fff";
   }
 }

 that name control inherits from a baseControl file:

public class BaseControl {
 protected virtual void LoadPage() {
  //Need to be implemented in the ascx file
 }
 private void Page_Load(object sender, System.EventArgs e) {
  myTest.Text= "fff";
  LoadPage();
 }
}

I know that all my control have a <asp ...

Go to the complete details ...