CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 11/24/2003 7:21:37 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 104 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
placek_martin
Asp.Net User
Render() vs. CreateChildControls() in composite control11/24/2003 7:21:37 PM

0/0

Hi,

can I use any method in CreateChildControls() which adds child controls (defined in aspx) at the position I want?
In Render method I can use base.RenderChildren() whenever I want.

Example code (ASPX):

<my:row>
<asp:Label ID="labelID" Text="middle"/>
</my:row>


Example code (CS):

public class Row : Control, INamingContainer {
protected override void Render (HtmlTextWriter writer) {
writer.Write("first - ");
base.RenderChildren(writer); // OK
writer.Write(" - last");
}

protected override void CreateChildControls() {
Controls.Add(new LiteralControl("first - "));
// ? HOW ?
Controls.Add(new LiteralControl("- last"));
}
}
drew10uga
Asp.Net User
Re: Render() vs. CreateChildControls() in composite control11/24/2003 10:41:46 PM

0/0

I use both! I use the render method to build a table that all my pages will display. And I use the createchildcontrols method to add a usercontrol and some buttons to a row in the table that the render method builds.

It's been a while, but I believe if you step through the code, you will see that render calls the createchildcontrols method.

HTH,
Drew
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Server Control and Component Development Authors: Shahram Khosravi, Pages: 1186, Published: 2006
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Professional ASP.NET 1.1 Authors: Alex Homer, Dave Sussman, Rob Howard, Brian Francis, Karli Watson, Richard Anderson, Pages: 1337, Published: 2004
Pro ASP.NET 2.0 in VB 2005: special edition. Authors: Laurence Moroney, Matthew MacDonald, Pages: 1360, Published: 2006
Programming Microsoft ASP.NET Authors: Dino Esposito, Pages: 1165, Published: 2003
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008
ASP.NET Kick Start: Kick Start Authors: Stephen Walther, Pages: 624, Published: 2002
Programming ASP.NET: Building Web Applications and Services with ASP.NET 2.0 Authors: Jesse Liberty, Dan Hurwitz, Pages: 930, Published: 2005
ASP.NET Solutions: 24 Case Studies : Best Practices and Design Patterns for Developers Authors: Richard C Leinecker, Pages: 0, Published: 2003
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008

Web:
CompositeControl using CreateChildControls vs OnInit vs Render ... CompositeControl using CreateChildControls vs OnInit vs Render. Last post 04-11- 2006 2:57 PM by RossCode. 3 replies. Sort Posts: ...
CreateChildControls vs RenderContents - ASP.NET Forums i can render html in CreateChildControls ? ... I am basically creating a composite control (I currently inherit from WebControl should I ...
Composite Server Control Sample Composite creates its child controls in the CreateChildControls method and not in OnInit .... Composite Control vs. User Control | Composition vs. Rendering ...
Schwammy Says... - Custom Server Controls: CreateChildControls ... Sep 28, 2007 ... My sample CompositeControl will have 2 controls within it: ... CreateChildControls(); }. In option B, all of the rendering is done within ...
ASP.NET Rendered Controls vs. Composite Controls - I prefer to ... Oct 18, 2005 ... 8 protected override void CreateChildControls() ... the composite control uses rendering behind the scenes anyway, but all the dirty work is ...
VS.NET - ASP.NET - Mortgage Calculator Composite control - mredkj.com The controls that will make up the composite control should be created in the CreateChildControls() method. Each of the controls created should then be ...
Rendering composite control... Talk about Rendering composite control... ... protected override void CreateChildControls() { _calendar = new Calendar(); _calendar. ...
About CreateChildControls() Trying to implement an composite control, I OverRide CreateChildControls(), where I add my controls, dinamicaly. I try to ad an System.Web. ...
Control.CreateChildControls Method (System.Web.UI) In this implementation, the composite control displays a TextBox control enclosed in two literal controls that render HTML. ...
CodeProject: TabStrip within ASP.NET 2.0 - Building a Composite ... Without going into too much detail about the CompositeControl class, one of the most important methods is the CreateChildControls() method. ...




Search This Site:










account login

run server exe when button clicked

language problem

asp.net 2.0

solpart button tool ( optimally use the dnn 2.1.1 features : )

account login procedures & verification code

express vs m.visual studio.net 2005

treeview checkbox with image

dnn 3.0.13 and up pa sqldataprovider script bug

translating special characters to printable form

customizing existing module

statichoverstyle-forecolor not working in menu control

upgrading treeview (1.1 to 2.0)

problem with mixing windows & forms security

calling a sub routine from a user control routine

how using/import to use csscollection??

website dll not being deployed

multipage module 1.0 breaks under dnn2

conditional redirection based on requesting urls

how to get email address from username

how do i connect directly and not use providers

configuration management block...

how to set up space in subfolder?

automate .aspx scripts

action menu

search module who doesn't work

the designer must create an instance of type '<type name>' but it cannot because the type is declared as abstract.

linkimage for dnn 3.0.12 - download now

tabs url redirect.

sql to another database

 
All Times Are GMT