469,609 Members | 1,574 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

object data source and select method

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") %>'
Oct 13 '07 #1
3 1863
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.Anoth erProperty")

Regards
--
Milosz
"Fresno Bob" wrote:
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") %>'
Oct 14 '07 #2
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.

"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plwrote in message
news:90**********************************@microsof t.com...
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.Anoth erProperty")

Regards
--
Milosz
"Fresno Bob" wrote:
>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") %>'

Oct 14 '07 #3
Hi there again Bob,

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

Regards
--
Milosz
"Fresno Bob" wrote:
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.

"Milosz Skalecki [MCAD]" <mi*****@DONTLIKESPAMwp.plwrote in message
news:90**********************************@microsof t.com...
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.Anoth erProperty")

Regards
--
Milosz
"Fresno Bob" wrote:
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") %>'


Oct 14 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by D Witherspoon | last post: by
3 posts views Thread by Adriano | last post: by
6 posts views Thread by insirawali | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.