Custom controls called from inside other custom controls???

I'm fairly new to writing controls in ASP.NET so, forgive the 

I am trying to create a base page class which will call 3 custom controls. This base page class will span across multiple projects hence the reason I am not creating user controls.
These 3 custom controls are:
1. TopNav-uses render method to display an HTML table with graphics for top navigation.
2. ImagePairs-uses prerender method to add javascript code to manage what graphic is
displayed in TopNav onMouseOver and onMouseOut
3. MgrHeader-uses render method to display an HTML table with some header graphics.
I have a web control library project which has the above 3 custom controls and my BasePage class.
My questions are:
1. How do I call the 3 custom controls from my BasePage class?
2. If I add another custom control for the footer of the page, how do I tell the BasePage
class where to display the header graphics and the footer graphics? I have seen
examples and was able to duplicate them with user controls using LoadControl
("blahblah.ascx"), but I am having a hard time with changing this to work with a custom
Any help you can provide would be much appreciated.
8/14/2003 3:24:09 PM 4216 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 52

Instead of the base-Page-class approach, I suggest you take a look at MasterPages, a page templating solution provided as a free sample from the team. The original is on this site in the control gallery. You may also want to look at my custom version of MasterPages
8/14/2003 5:17:23 PM

Thanks very much for your input. I was reading some other posts and decided to use the base page class and never gave much thought to the MasterPages (probably because I really do not know enought about it). I guess I have some more reading to do.
Thanks again,
8/14/2003 6:32:21 PM

Similar Artilces:

Custom Control: Calling a function on calling page FROM a custom control ? help !!
I have a custom control placed on many pages, to make things simple, basically what I want to do is Call a function on the calling page from the custom control ieAnyone have any ideas, simple solution would be good !!  This is the code I have myControl.ascx.vbPublic Partial Class myControl    Inherits System.Web.UI.UserControl    Protected Sub testButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles testButton.Click        'call save function on PersonalDetails.aspx.vb  &...

Creating Custom Controls With Custom Controls Inside Of Them
Hello, I am trying to create a custom control for creating tabs. The idea is that our designer can just use the control tags to generate the tabs.  The problem that I am running into is that I want to be able to have a custom control that allows any number of child custom controls. So there would be a TabContainer Control, and within that there would be any number of tabs.  The idea is similar to how an asp:DropDown list can have any number of ListItems within them.  Here is my code, any help is appreciated. 1 <!-- TAB CONTAINER -->2 <%@ Control Language=&...

Custom Web Control inside another Custom Web Control
Hi I created a custom web control (CusWebNew) that displays some textboxes by adding them to the ControlCollection of the webcontrol. I also created a custom webcontrol (CustWebButton) that inherts from Button control, and overrided the OnClick function. When I use CustWebButton on a regular web form, it seems to function correctly. However, when I added to be part of the ControlCollection of CustWebNew, it stops to work.   Any ideas why? Thanks Hey, What do you mean by stops to work?  Explain what you are trying to do with it and what it doesn't do.Brian"Trust in the...

Custom Control within a Custom Control
I have two individual custom controls say custom cc1 and cc2. cc1 is communicating to cc2 using event delegate mechanism.I have tested the behaviour by dropping cc1 and cc2 onto a Web Page and it works fine. I want to create a third custom control say cc3 which should contain both cc1 and cc2. So that if i drag and drop cc3 onto a Web Page i can acheive exactly what i am doing above. The problem is that i am not sure how to call/register a custom control within a custom control ? Any clue ? Thanks!! Hi, Do you mean adding custom control to custom control? I think you can use the same wa...

Custom Server Control Made of Custom Controls?
I'm giving myself a crash course in custom server controls, and I have a quick general question. Can I have a custom server control that is composed of other server controls I created. I'm pretty sure the answer is yes, but I want to be positive. Yes Shows how to combine existing controls into a new control using class composition. -ron Thanks! ASP.NET so rocks! Making page components extensible objects is such a great idea! I love it....

Custom Control within a Control Control
I am developing a custom controls that will render headers for different web sites. Within these controls, I want to place another custom control that will change the language. I created the language control and had it implement IPostBackDataHandler. This control works fine if I drag it on a new web form, but if I tell a header custom control to render it problems occur. The Language Selector custom control does not have a Page member anymore and the event handlers do not work. Does anyone have any experience with doing something similiar? Anyone have any suggestions? Thanks, ...

Web Custom Controls
Hi. I created 4 web custom controls (dropdown lists). I need to get back to the calling control (web page) where I am using these controls. I want to use the controls separately or use them as a type of hierarchy. When they are used individually (one per page), the dropdown list must be populated with all the items in the table. When used as a hierarchy (more than one per page), the one must be dependant on the other, and items from the table must be returned depending on what the user selected in the parent control (dropdown list). Is this even possible? Thanks yes, it is possible. In you...

Custom Control Inside a Repeater Control
I have a repeater control on the main page and would like to load a custom user control inside the repeater control. The custom user control is basically a GridView. A few values will need to be passed to the custom user control to define the where clause for the GridView DataSet. Can anyone provide me with or point me to a simple example of this functionality?Allan Horwitz Nevermind, I just put a GridView inside the Repeater Control tags and used the OnItemDataBound event to get the variables.Allan Horwitz...

custom control inside user control
hey all, i have a web page which dynamically loads my WebUserControl with the LoadControl method. The WebUserControl has just an empty GridView in which, in the code-behind, I dynamically add templated columns to the GridView. I created a simple custom control (to start learning about them) which consists of a textbox, button, and calendar. In one of the dynamic Edit Template Columns i'm also dynamically creating this custom control in the template class. ?? So when i run the application the custom control shows up fine when i put the GridView in edit mode. I can clic...

Custom User Controls v. Custom Web Controls
Hi! Is it better for me to begin coding my controls instead of just designing them? What would the benefits be? I meen, i seem to be able to get all i need from just putting stuff together on an ASCX file but i'm obviously missing a huge concept here... please explain! Hi, creating user controls is indeed easier than creating custom server controls because you can simply drag & drop other controls on the form, easily add events to it, ... Custom controls however are better when you want to reuse them in several other projects. I like to create custom controls for small, reusable com...

Dynamic custom control on custom control
What I'm trying to do is create a module for use within a larger page.  The page itself is an order form, which will have typical payment info (address, credit card, etc.), and the ability to select what you are paying for.  Our clients will have several options in how they want the page setup.  They can either have a single form, or they can have each module on it's own page.  They can also have all the selected items fire in a single transaction, or have a seperate transaction for each item selected.  And they can limit the total number of transactions a person can...

Web Custom Control within a Web Custom Control
I was wondering if this can be done and how. I've created a simple custom control that displays a header which is my first custom control. So I'm just a baby when it comes to this.. Within the header I currently have a property for breadcrumbs which is a string. What I would like to do is have the breadcrumb property  be a Link Button List. I did find a custom control of a Link Button List which is exactly what I wanted. My question is how can/do  I include this into my custom control? Can it done? How? Please help? I'm at a lose here.   Susan You should be able to do ...

Architecture: .Net Controls vs. Custom Controls
I'm interested in managing users. i.e. Logins and profiles, etc.My question is, should I be using things like the Login control or should I program these from scratch? I dont like the fact that .NET creates so many things for me. This level of abstraction terrifies me and it feels like I have no control over the code .I've done a few huge sites in Classic ASP (million-hits-per-day type sites) and I'm not sure how robust certain controls are, or when to use them.Is, for example, the Login control aimed at newbies to .NET? Should it be used for the larger projects with thousands of...

Web Custom Control
Hi. I created 4 drop downlist controls as web custom controls, which I would either like to use seperately, or working together like a hierarchy (dependant on each other). The problem is, I need to communicate with the calling control (the web page where I dragged these controls on). When the dropdownlists are used seperately, they should return all items on a table, but when they are used together, the child dropdownlist should only return items from the table based on the selection of the parent dropdownlist just above it. Can anyone please help? Thanks. You should post this in the Build...

Web resources about - Custom controls called from inside other custom controls??? -

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

TERROR IN JAKARTA: 'Situation under control' after explosions, gunfire erupt in Indonesian capital
At least six people are dead, including three police officers, after several explosions at the Sarinah shopping mall in an apparent multi-site ...

Backburn approved in bid to control bushfire before blaze hit Wye River - HeraldSun Search Search
A BACKBURN was approved to try to control a bushfire in the days before it tore through more than 100 homes in Wye River on Christmas Day.

DFES downgrades bushfire in Dunsborough as it is contained, but not under control
A BUSHFIRE south of Dunsborough has been contained but is not yet under control.

WA fires: threatening Jindalee blaze brought under control
A fire that was at one stage a threat to lives on homes in Jindalee on Thursday has been brought under control.

Queensland police shut down out-of-control party in Berserker, Rockhampton
Police shut down a party of 150 young people who had gathered at a house in Berserker, Rockhampton on Friday night.

BMW recalls i8 for stability control problem
... , BMW , Safety , Coupe , Hybrid , Performance BMW will recall a small number of 2015 i8s because of a problem with the dynamic stability control ...

ESI cost control and networks
There is an interesting discussion thread on Twitter about how the way Medicare for All saves money is by significantly reducing provider, device, ...

Apple has landed a very rare sponsorship deal to ensure it has control of the hottest ticket in San Francisco ...
Apple has signed up for the first time to become a sponsor of the Super Bowl Host Committee, Daniel Roberts at Yahoo Finance reported. It's ...

Leonardo DiCaprio: The Oscar stuff is ‘completely beyond my control at this point’
... last night’s London premiere of The Revenant . Leo is looking pretty good these days. He’s de-bloated, his facial hair is very much under control, ...

Resources last updated: 1/16/2016 8:43:28 AM