Binds a data source to the invoked server control and all its child controls with an option to raise the Control.DataBinding event.
- raiseOnDataBinding
- true if the Control.DataBinding event is raised; otherwise, false.
Use the Control.DataBind(bool) method in a scenario when your custom control overrides the Control.DataBind method and implements the System.Web.UI.IDataItemContainer interface. In this scenario, the custom control calls the Control.DataBind(bool) method with raiseOnDataBinding set to false to ensure that the base class's Control.DataBind method gets called.
The Control.DataBind method invokes the Control.DataBind(bool) method with raiseOnDataBinding set to true.
Calling the Control.DataBind(bool) method with raiseOnDataBinding set to false causes any child controls to be data bound with the Control.DataBind method.