473,385 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Composite control with custom control

Hi,
I have a custom composite webcontrol (Frameset) which inherits from the
panel webcontrol. This control uses another control named Menu. If I don't
add mMenu with Controls.Add(mMenu), the menu doesn't render when
mMenu.RenderControl(writer) is invoked. But, if I put Controls.Add(mMenu),
the control is rendered twice (which is normal since I call
MyBase.RenderChildren(writer)).
What should I do ?
Thanks
Fred

<ToolboxData("<{0}:Frameset runat=server></{0}:Frameset>")> _
Public Class Frameset
Inherits System.Web.UI.WebControls.Panel
Implements INamingContainer

Dim mMenu As Menu

Protected Overrides Sub RenderChildren(ByVal writer As
System.Web.UI.HtmlTextWriter)
writer.Write('blabla")
mMenu.RenderControl(writer)
writer.Write("blabla")
MyBase.RenderChildren(writer)
writer.Write("blabla")
End Sub

Protected Overrides Sub CreateChildControls()
MyBase.CreateChildControls()
mMenu = New Menu
Controls.Add(mMenu)
End Sub
Nov 18 '05 #1
0 1142

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lamar | last post by:
I made a Custom composite web control that incorporates a menu with buttons and an encapsulating table cell for the child controls that are within the custom control's tags in the HTML. All the...
5
by: Barry Carr | last post by:
Hi, I've created a composite custom web control and a ControlDesigner descendant to render the control a design time. The child controls are public properties of composite control and as such...
1
by: Jeff | last post by:
Hi - I am developing a composite control using VB.NET. In the ASP.NET page using the control, How can I update a label text value to reflect the value of a property of the custom control...
0
by: James | last post by:
I have a composite custom control which is constructed of several other controls, such as command buttons, a listview etc. I have several controls which border the boundary of the container and have...
0
by: multiformity | last post by:
Ok, so I have gone off and documented the lifecycle of a page with a custom composite control on it. You can find that document here: http://www.ats-engineers.com/lifecycle.htm Now, I am...
3
by: Beavis | last post by:
I hate to repost a message, but I am still at the same point where I was when I originally posted, and hopefully someone else will see this one... Ok, so I have gone off and documented the...
1
by: shantanu_kush | last post by:
Hi there, I am using a DataList in a composite control. The DataList has an Custom ItemTemplate(ITemplate) which adds a Button to the DataList Item as shown in the code below : public class...
0
by: Ralph | last post by:
I have a web page that dynamically loads user controls based on user selection. I store these in an an array. One of the pages has a custom control on it. It is a composite control. I have a few...
4
by: Rick | last post by:
Hello, I built a composite web control that has a textbox and a date control. added my custom control on a webform where there are other standard controls. Each control on the form has a...
6
by: shapper | last post by:
Hello, I am working in a class library with various custom controls. In which cases should a control inherit Control, WebControl and CompositeControl classes? And when should a custom...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.