Adds a binding to the control. This method is a simple way to establish a binding. Returns the Item so you can customize properties further

Namespace:  Mindscape.LightSpeed.Web.WebForms
Assembly:  Mindscape.LightSpeed.Web (in Mindscape.LightSpeed.Web.dll)
Version: 4.0.1000.1 (4.0.0.0)

Syntax

C#
public EntityDataBindingItem AddBinding(
	Control ControlToBind,
	string ControlPropertyToBind,
	Object SourceObjectToBindTo,
	string SourceMemberToBindTo
)
Visual Basic (Declaration)
Public Function AddBinding ( _
	ControlToBind As Control, _
	ControlPropertyToBind As String, _
	SourceObjectToBindTo As Object, _
	SourceMemberToBindTo As String _
) As EntityDataBindingItem

Parameters

ControlToBind
Type: System.Web.UI..::.Control
The control which is to be bound on the WebForm
ControlPropertyToBind
Type: System..::.String
The property on the control which is to be bound by the DataBinder
SourceObjectToBindTo
Type: System..::.Object
The object which is to be bound from your model or code behind file
SourceMemberToBindTo
Type: System..::.String
The property on the object which is to be bound by the DataBinder

Return Value

An EntityDataBindingItem instance which describes the binding between WebForm control and source object

See Also