473,789 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(mM enu), the menu doesn't render when
mMenu.RenderCon trol(writer) is invoked. But, if I put Controls.Add(mM enu),
the control is rendered twice (which is normal since I call
MyBase.RenderCh ildren(writer)) .
What should I do ?
Thanks
Fred

<ToolboxData("< {0}:Frameset runat=server></{0}:Frameset>") > _
Public Class Frameset
Inherits System.Web.UI.W ebControls.Pane l
Implements INamingContaine r

Dim mMenu As Menu

Protected Overrides Sub RenderChildren( ByVal writer As
System.Web.UI.H tmlTextWriter)
writer.Write('b labla")
mMenu.RenderCon trol(writer)
writer.Write("b labla")
MyBase.RenderCh ildren(writer)
writer.Write("b labla")
End Sub

Protected Overrides Sub CreateChildCont rols()
MyBase.CreateCh ildControls()
mMenu = New Menu
Controls.Add(mM enu)
End Sub
Nov 18 '05 #1
0 1162

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

Similar topics

0
1269
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 controls that are between the opening and closing tags of my custom control work except for the calendar. You can select the date for the current month and all works fine. It returns the next page with the correct date highlighted but if you...
5
4091
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 the child controls appear in the property inspector as sub-properties of the main control and can be manipulated as normal at design time. If any of the properties of the parent (main) control are changed at design time the composite control is...
1
1318
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 whenever the composite control is changed? The label is not a part of the custom control. I've managed to correctly set the composite control properties whenever it
0
1260
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 their anchor properties set accordingly, for example, ensuring a button stays on the right border when the control is resized. Now in the control's design view everything works correctly, controls are correctly repositioned. However, when I put...
0
1409
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 working on a much more complex grid example, and according to my findings, the order should be like so: Page Constructor Page OnInit
3
3011
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 lifecycle of a page with a custom composite control on it. You can find that document here: http://www.ats-engineers.com/lifecycle.htm
1
3961
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 DatalistItemTemplate : ITemplate { public void InstantiateIn(Control container)
0
1116
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 buttons on the page and it seems their event handling code is never called. I tested this control on a page by itself and the events seem to work properly. I am new to asp.net 2.0, so I am probably just doing something wrong
4
2110
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 required validator. I need to have a validator for my custom control, but don't know how to do this. I added a CustomValidator to the form, but in design mode, my custom
6
2633
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 control implement INamingContainer? In this moment I am working on a custom control that is composed by a
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10404
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9016
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7525
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6765
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4090
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.