Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 4th, 2006, 01:53 AM
Registered User
 
Join Date: Jan 2006
Location: , , .
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))
            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
  #2 (permalink)  
Old January 4th, 2006, 12:15 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Where are the button's and their event handlers?

-Peter
  #3 (permalink)  
Old January 4th, 2006, 12:33 PM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In the User Control.

------------------------
DieHard
http://www.diehard.cc
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:25 AM.


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