I've been bashing my head for a few days on this problem. My Custom Server Control loads the User Control and renders it properly. But, when I run the web application the controls (ex: buttons, labels, textboxes) in the User Control are not firing (ex: a button is click to change the label's text)?
Here is a snippet of part of my code:
Protected Overrides Sub CreateChildControls()
plhPanel = New System.Web.UI.WebControls.PlaceHolder
ContentFileLoaded = New System.Web.UI.UserControl
For Each objPanel As jsPanel In aryPanels
jsPanelId = "pid_" & Convert.ToString(objPanel.PanelId)
jsContentId = jsPanelId & "_cid"
If objPanel.ContentFile = Nothing Then
plhPanel.Controls.Add(New LiteralControl(objPanel.Text))
Else
ContentFileLoaded = Me.Page.LoadControl(objPanel.ContentFile)
plhPanel.Controls.Add(ContentFileLoaded)
End If
Next
Me.Controls.Add(plhPanel)
End Sub
I'm guessing that maybe its not getting the controls from the User Control. Please Help Me!
------------------------
DieHard
http://www.diehard.cc