P
Petr PALAS
Hello,
I'm trying to load a user control (ASCX) from server control (*.vb) and
display it on the page. The user control is displayed, but its postback
events do not work - when I press a button, nothing happens.
When I load the same user control directly from an ASPX page using the
Page.LoadControl method, everything works fine.
The server control looks like this:
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
EnsureChildControls()
mControl.RenderControl(output)
End Sub
Protected Overrides Sub CreateChildControls()
mControl = Page.LoadControl("mycontrol.ascx")
Me.Controls.Add(mControl)
End Sub
Any idea where I make the error?
Thank you.
Best Regards,
Petr Palas
********************************************************************************
Kentico Software
WWW: www.kentico.com
Blog: www.kentico.com/blog
Kentico CMS - The most affordable CMS for ASP.NET professionals.
********************************************************************************
I'm trying to load a user control (ASCX) from server control (*.vb) and
display it on the page. The user control is displayed, but its postback
events do not work - when I press a button, nothing happens.
When I load the same user control directly from an ASPX page using the
Page.LoadControl method, everything works fine.
The server control looks like this:
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
EnsureChildControls()
mControl.RenderControl(output)
End Sub
Protected Overrides Sub CreateChildControls()
mControl = Page.LoadControl("mycontrol.ascx")
Me.Controls.Add(mControl)
End Sub
Any idea where I make the error?
Thank you.
Best Regards,
Petr Palas
********************************************************************************
Kentico Software
WWW: www.kentico.com
Blog: www.kentico.com/blog
Kentico CMS - The most affordable CMS for ASP.NET professionals.
********************************************************************************