object data source and select method

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") %>'
 
G

Guest

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
 
F

Fresno Bob

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.
 
G

Guest

Hi there again Bob,

Could you please explain in details what you're trying to do?

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top