Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Custom Container Control Changes the Input Tag Names of Child Controls???

Reply
Thread Tools

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

 
 
Chris Newby
Guest
Posts: n/a
 
      02-25-2005
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//


 
Reply With Quote
 
 
 
 
Vaibhav
Guest
Posts: n/a
 
      02-25-2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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//
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom container control - wrapping child controls gerry ASP .Net 5 08-06-2008 01:47 PM
custom container control - wrapping child controls gerry ASP .Net 0 07-22-2008 03:36 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
custom container control (IFRAME) that adjusts it height after dynamic client-side content changes? TR ASP .Net Web Controls 0 06-03-2004 03:46 PM
How do I: Main thread spawn child threads, which child processes...control those child processes? Jeff Rodriguez C Programming 23 12-09-2003 11:06 PM



Advertisments