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

Custom Container Control Changes the Input Tag Names of Child Controls???

I have a custom control that derives from the WebControls.Panel class.

In a given ASPX document, I have an instance of my custom control with ID
set to "MyControl".

Then I put a WebControls.TextBox control inside my custom control with ID
set to "MyTextBox".

When this page renderes, inspection of the HTML source shows that the Name
attribute of the input tag generated from MyTextBox is now actually
"MyControl:MyTextBox" and not just "MyTextBox".

Trying a similiar scenario, but using the standard WebControls.Panel as a
container instead of my panel-derived custom control, the input tag Name
attribute is as expected, "MyTextBox".

So, I figure I'm cleary doing something wrong.

Any thoughts?

TIA//
Nov 19 '05 #1
1 1629
One reasoning would be how the system treats the controls on a page. I
think in case of custom control the textbox control is taken to be part of
the custom control, but in case of a system control the inserted text box is
also taken as part of the page besides being part of the panel.

HTH

"Chris Newby" <CA*****************@hotmail.com> wrote in message
news:u9**************@tk2msftngp13.phx.gbl...
I have a custom control that derives from the WebControls.Panel class.

In a given ASPX document, I have an instance of my custom control with ID
set to "MyControl".

Then I put a WebControls.TextBox control inside my custom control with ID
set to "MyTextBox".

When this page renderes, inspection of the HTML source shows that the Name
attribute of the input tag generated from MyTextBox is now actually
"MyControl:MyTextBox" and not just "MyTextBox".

Trying a similiar scenario, but using the standard WebControls.Panel as a
container instead of my panel-derived custom control, the input tag Name
attribute is as expected, "MyTextBox".

So, I figure I'm cleary doing something wrong.

Any thoughts?

TIA//

Nov 19 '05 #2

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

Similar topics

2
by: Pham Nguyen | last post by:
Has anyone seen an example of a textbox server control that has built-in client-side validation? I'd like to build a server control that extends the System.Web.UI.WebControls.TextBox class to allow...
2
by: Juan Romero | last post by:
Hey guys, I am working on a web custom control that basically draws a table (ASP Table) with a few child controls in the cells. I have a command button inside one of these cells. The problem I...
7
by: Girish | last post by:
OK.. phew. Playing with data grids for the past few days has been fun and a huge learning experience.. My problem. I have a requirement to display a gird with a gird. Within the embedded grid,...
0
by: Jeremy Chapman | last post by:
I have included below virtually all the code to a control I'm trying to build. My issue is that an array list property in my control does not get persisted properly to the aspx page code in design...
0
by: pabloazorin | last post by:
I developed a Date Picker web control using C# and .net framework 1.1 I added my control to Visual Studio 2003 IDE toolbar. When I drag and drop my control to design web page, the control renders...
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:...
1
by: mnuckols | last post by:
I am trying to create a custom container control for Windows Forms using C#.NET 2.0. My problem is that I want only part of the control to allow other controls to be placed on it at design time. ...
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: 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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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.