Last post Apr 26, 2011 03:19 PM by jkirkerx
Apr 25, 2011 05:25 AM|shtrudel|LINK
After reading a few articles I am trying to summarize the difference between
CreateChildControls and PerformDataBinding.
In the PerformDataBinding we have access to the data so we can use this routine for building the controls tree based on the data rows stored in the
PerformDataBinding data parameter. In the CreateChildControls we have no access to the data and we can set the general attributes for the control, like displaying or hiding part of the custom control.
Am I missing anything?
Apr 26, 2011 03:19 PM|jkirkerx|LINK
CreateChildControls is a method of iterating through a collection or composition of code behind objects, that will then be added to the htmltextwriter collection on the server side. The htmltextwriter is then processed by the server, and return to the users
webbrowser as html markup code to create the page that was requested.
PerformDatabinding is a function that handles the automatic binding of data to a object that is databinding aware or ready. This process occurs after createChildControls, in the page lifecycle. If the object does not exist first, then you cannot bind data
to it. Normally you bind data in the Page_Load cycle of the page life cycle.