473,396 Members | 1,961 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,396 software developers and data experts.

Custom control within User control within XML template

Hello

I am using ASP.NET - I have written a Custom Control (to output some
information) that has a public property declared.

I have a user control that is a wrapper around the above custom
control. The code behind is nothing more than what is generated. The
ascx is :-

<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="Menu.ascx.vb" Inherits="CIIS.Menu"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register TagPrefix="cc2" Namespace="CIIS.DSC_CommonControls"
Assembly="CIIS" %>
<cc2:Menu id="Menu1" runat="server"></cc2:Menu>

Each page display this usercontrol via an inherited base page which
uses an XML template to show frequently used items (headers, footers,
menus, etc). The XML file only can only refer to user controls (hence
the requirement for the wrapper) and looks like :-

<template:UserControl id="ucMenu" src="../UserControl/Menu.ascx"
tabindex="-1"/>

This all works (everything shows) except when I try to set the public
property in a page via :-

....
Protected WithEvents Menu1 As CIIS.DSC_CommonControls.Menu
....
Menu1.Headline = "CIIS Home" '<--exception thrown
....

When I trace it Menu1 is nothing (I get an object has no reference) -
the XML template does not instantiate the user control like a reference
within the aspx normally would. Note I can set the attribute within
the wrapper but this is useless as I can't pass anything to the wrapper
(as it is equal to nothing).

Any ideas on how to create the reference (or perhaps make it shared) so
I can set the public property.

Cheers
Phil

Jul 21 '05 #1
0 1446

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

Similar topics

0
by: Earl Teigrob | last post by:
I have created a templated custom control that simply creates a spacing table around other objects. This control works fine for most uses but when I add it inside the ItemTemplate of a DataGrid...
0
by: microdevsolutions | last post by:
Hello I am using ASP.NET - I have written a Custom Control (to output some information) that has a public property declared. I have a user control that is a wrapper around the above custom...
1
by: Andrew Clancy | last post by:
Hi, Myself and a colleague are attempting to mimic the custom template functionality of the ASP.Net 2 Login control. Essentially, we would like to have the ability within our...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
11
by: Nick Gilbert | last post by:
Hi, How can I create a custom control which will wrap its content in a header and footer? eg: Is it possible to create a .NET user control which can surround other controls? eg:...
5
by: gerry | last post by:
I am trying to create a custom container control that will only ever contain a specific type of control. At design time, when a control of a different type is added to the container I would like...
0
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
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: 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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.