.NETGURU
Child Controls Processing
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolscs' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Scott Watermasysk

I have a control that wraps around other controls:

<CN:ParentControl runat = "Server">
    <SUB:ChildControl runat = "Server" />
    <SUB:ChildControl runat = "Server" />
    <SUB:ChildControl runat = "Server" />
</CN:ParentControl >

Under certain conditions in ParentControl I set its visibility to false,
which of course hides the other three controls. This is the desired effect.
When I look at the control tree using Trace, I can still see the
SUB:ChildControl's(which makes sense).

However, for performance purposes, if you can't see it, it seems like a
waste to let it continue processing. Is it possible to disallow child
control processing if a certain parameter is met in the parent? Any
examples?

Thanks,
Scott

Reply to this message...
 
    
Ryan Trudelle-Schwarz
How are you building the children? If you were to use a custom control =
builder (or whatever it is called) you should be able to do checks and =
skip those children if required.

-----Original Message-----
From: Scott Watermasysk [mailto:Click here to reveal e-mail address]=20
=20
I have a control that wraps around other controls:

<CN:ParentControl runat =3D "Server">
    <SUB:ChildControl runat =3D "Server" />
    <SUB:ChildControl runat =3D "Server" />
    <SUB:ChildControl runat =3D "Server" />
</CN:ParentControl >

Under certain conditions in ParentControl I set its visibility to false,
which of course hides the other three controls. This is the desired =
effect.
When I look at the control tree using Trace, I can still see the
SUB:ChildControl's(which makes sense).

However, for performance purposes, if you can't see it, it seems like a
waste to let it continue processing. Is it possible to disallow child
control processing if a certain parameter is met in the parent? Any
examples?

Thanks,
Scott

---
[This E-mail scanned for viruses by Declude Virus]

Reply to this message...
 
    
Scott Watermasysk (VIP)
I am not handling the building of the childcontrols myself. I have used
built a controlbuilder in the past, so maybe I will check that out.

In this case though, the childcontrol could be anything from plain text to a
usercontrol. My ParentControl functions properly, I just thought it would be
a good idea performance wise to not build the childcontrols if they aren't
going to be rendered back to the client.

Thanks for the suggestion.

-Scott

-----Original Message-----
From: Ryan Trudelle-Schwarz [mailto:Click here to reveal e-mail address]
Sent: Tuesday, May 14, 2002 1:06 AM
To: aspngcontrolscs
Subject: [aspngcontrolscs] RE: Child Controls Processing

How are you building the children? If you were to use a custom control
builder (or whatever it is called) you should be able to do checks and skip
those children if required.

-----Original Message-----
From: Scott Watermasysk [mailto:Click here to reveal e-mail address]

I have a control that wraps around other controls:

<CN:ParentControl runat = "Server">
    <SUB:ChildControl runat = "Server" />
    <SUB:ChildControl runat = "Server" />
    <SUB:ChildControl runat = "Server" />
</CN:ParentControl >

Under certain conditions in ParentControl I set its visibility to false,
which of course hides the other three controls. This is the desired effect.
When I look at the control tree using Trace, I can still see the
SUB:ChildControl's(which makes sense).

However, for performance purposes, if you can't see it, it seems like a
waste to let it continue processing. Is it possible to disallow child
control processing if a certain parameter is met in the parent? Any
examples?

Thanks,
Scott

---
[This E-mail scanned for viruses by Declude Virus]

| [aspngcontrolscs] member Click here to reveal e-mail address =
| YOUR ID http://www.asplists.com/asplists/aspngcontrolscs.asp =
| JOIN/QUIT http://www.asplists.com/search = SEARCH Archives

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification