473,385 Members | 2,044 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.

vs2005 Web Custom Control

I need to create web custom control that can contain any type of control as
a child (similar to asp:Panel control). However, when I try to include
children in my web control on aspx page, it says 'Content is not allowed
between the opening and closing tags for element'.

Does any one have an example of how to build this simple web custom control?

Thanks,
Nov 19 '05 #1
1 1087
You must create a library (so it is a Custom Sever Control and not a User
Control)

public class SlideNavMenu : Control
{
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
}
protected override void Render(HtmlTextWriter output)
{
this.CreateChildControls();
for (int i = 0; i < this.Controls.Count; i++)
{
this.Controls.RenderControl(output);
}
}
}
--
Daniel Fisher(lennybacon)
http://www.lennybacon.com
"Amelyan" <ba******@wi.rr.com> wrote in message
news:uY**************@TK2MSFTNGP15.phx.gbl...
I need to create web custom control that can contain any type of control as
a child (similar to asp:Panel control). However, when I try to include
children in my web control on aspx page, it says 'Content is not allowed
between the opening and closing tags for element'.

Does any one have an example of how to build this simple web custom
control?

Thanks,

Nov 19 '05 #2

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

Similar topics

3
by: Robert | last post by:
I have an application with custom configuration sections in it's app.config file. Here's a shortened excerpt: <monitors> <monitor...
2
by: Amelyan | last post by:
I *finally* narrowed down my problem to my custom web control. If I hookup event inside dynamically created custom web control, it doesn't get fired. However, event gets fired for any other...
4
by: Bob | last post by:
Hi, In VS2003 conditional compilation constants and their state could be defined at project level. I was using this to control what features where offered by various builds. i.e....
1
by: DZ | last post by:
Help! I wish to have the selection bar on a ListView control look like the selection bar on menus of VS2005. ie. Navy blue border with a light blue transparent background which shows the...
1
by: Martin Robins | last post by:
I have developed a custom control that, among others, includes a property that is a collection of "Items". If I place an instance of my control onto a CF form, I can view all of the properties...
4
by: Jules Winfield | last post by:
I'm using VS2005. I have a solution consisting of twelve projects. All projects are console/service apps except for one which is a WinForms app. There are no web projects. I'd say that I'm at...
2
by: phil | last post by:
Bit of a newbie on C# and .Net I have an object with a List< 'things'- each thing can be displayed in its own a control window. What I would like is a tab-view as in Excel where the users can...
0
by: =?Utf-8?B?SGVsZ2U=?= | last post by:
Hi! I have run into a problem with visual inheritance using the VS2005 designer for Windows Forms. My goal is to put business logic and common rules for our controls into its own layer (base...
2
by: Chris Paxton | last post by:
I have a fairly basic VB.NET application that I converted from VS2003 to VS2005 and now it crashed the VS2005 IDE pretty regularly while trying to use the form designer. I've removed any 3rd...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
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...
0
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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.