I am trying to create a section head control dynamically (in code) however I think I am missing something simple - the code i used
---------------------------------------
Dim createTable1 As New Table
Dim mySectionHead As DotNetNuke.UI.UserControls.SectionHeadControl = New DotNetNuke.UI.UserControls.SectionHeadControl
mySectionHead.Text = "testing the sectionhead"
mySectionHead.Section = createTable1.ClientID
Me.plCategoryListing.Controls.Add(mySectionHead)
Me.plCategoryListing.Controls.Add(createTable1)
-----------------------------------------
gives me this - any ideas on where i need to do this or is it possible since you have to ge a control name to the section head control
--------------
DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.UserControls.SectionHeadControl.set_Text(String Value) at YourCompany.Modules.CodeAgora_Project.ViewCodeAgora_Project.CreateCategoryList() at YourCompany.Modules.CodeAgora_Project.ViewCodeAgora_Project.Page_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---