Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 4th, 2006, 01:53 AM
Registered User
Join Date: Jan 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help! Custom Server Control using User Control

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))
                ContentFileLoaded = Me.Page.LoadControl(objPanel.ContentFile)
            End If
    End Sub

I'm guessing that maybe its not getting the controls from the User Control. Please Help Me!

Old January 4th, 2006, 12:15 PM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

Where are the button's and their event handlers?

Old January 4th, 2006, 12:33 PM
Registered User
Join Date: Jan 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

In the User Control.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Server Control....Custom Property Editor ZArrinPour ASP.NET 1.0 and 1.1 Basics 1 June 15th, 2010 11:30 AM
custom Property Enable & Disable in user control tiks C# 1 August 20th, 2008 09:31 AM
Custom User Control hossrad C# 2005 0 May 10th, 2008 07:40 AM
User Control within Custom Server Controls www2004 ASP.NET 1.x and 2.0 Application Design 3 April 15th, 2005 09:00 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.