Export (0) Print
Expand All

Control.DataBind Method (Boolean)

Binds a data source to the invoked server control and all its child controls with an option to raise the DataBinding event.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

'Declaration
Protected Overridable Sub DataBind ( _
	raiseOnDataBinding As Boolean _
)
'Usage
Dim raiseOnDataBinding As Boolean

Me.DataBind(raiseOnDataBinding)
protected void DataBind (
	boolean raiseOnDataBinding
)
protected function DataBind (
	raiseOnDataBinding : boolean
)
Not applicable.

Parameters

raiseOnDataBinding

true if the DataBinding event is raised; otherwise, false. The default is false.

Use the Control.DataBind(Boolean) method in a scenario when your custom control overrides the DataBind method and implements the IDataItemContainer interface. In this scenario, the custom control calls the Control.DataBind(Boolean) method with raiseOnDataBinding set to false to ensure that the base class's DataBind method gets called.

The Control.DataBind method invokes the Control.DataBind(Boolean) method with raiseOnDataBinding set to true.

NoteNote:

Calling the Control.DataBind(Boolean) method with raiseOnDataBinding set to false causes any child controls to be data bound with the Control.DataBind method.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft