Se foloseste CreateChildControls ptr.
* Instantierea controalelor
* Adaugare evenimente la controale
* Adaugare controale la colectia Controls cu Controls.Add
Se foloseste Render ptr.
* Adaugare logica ptr. a determina daca se face sau nu display la controale
* Render controls folosind control.RenderControl()
It is called logically called before Render event of the ASP.NET page.
This is the last opportunity for us to affect the rendering behavior of the web part page.
Things like changes to the viewstate properties can be done logically in the OnPreRender event.
Moreover the OnPreRender event is called logically after the events EnsureChildControls and CreateChildControls
If we need to render the ASP.NET web server controls (ike button, text box etc) in the web part,
this event needs to be overridden. Logically we can add web controls and wire the events to it
This event is used logically to control the rendering behavior of the web part.
There is already a default implementation of Render method.
We need not always override Render method for certain cases
like CreateChildControls method having the logic to add controls.
Render method can be overridden to render both the html stuff and ASP.NET web server controls
This method can be called inside the overridden Render method to render the ASP.NET web server controls
like button, textbox etc…
RenderContents gives power to render the html streams directly inside the overridden Render method.
The RenderContents should be preceded by RenderBeginTag and the RenderContents should be followed RenderEndTag