object data source and select method

  • Thread starter Thread starter Fresno Bob
  • Start date Start date
F

Fresno Bob

When you bind to the object data source you can bind to the underlying
dataset that is returned by the select statement but can you bind to the
properties of the object? MSDN says the objectdatasource can return an
object. Say for instance I have a customer object with a name property. Can
I bind to it e.g.

Text='<%# Bind("Name") %>'
 
Hi Bob,

Yes, you can bind it to a property of an object. In addition, complex data
binding expession are supported as well (only for one way binding Eval, not
in Bind)ie.

Eval("PropertyOfAnObjectType.AnotherProperty.AnotherProperty")

Regards
 
So when I call my update method I can just automatically use my internal
object variables and pass them to my data code?

Set(ByVal Value As String)
m_name = value
End Set

Public Function Update(updateid as integer)
ds.name = m_name

Is this kind of two way binding supported for basic types such as strings
and integers etc.
 
Back
Top