Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

object data source and select method

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fresno Bob - 13 Oct 2007 12:31 GMT
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") %>'
Milosz Skalecki [MCAD] - 14 Oct 2007 15:37 GMT
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
Signature

Milosz

> 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
[quoted text clipped - 3 lines]
>
> Text='<%# Bind("Name") %>'
Fresno Bob - 14 Oct 2007 17:12 GMT
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.

> Hi Bob,
>
[quoted text clipped - 15 lines]
>>
>> Text='<%# Bind("Name") %>'
Milosz Skalecki [MCAD] - 14 Oct 2007 23:16 GMT
Hi there again Bob,

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

Regards
Signature

Milosz

> So when I call my update method I can just automatically use my internal
> object variables and pass them to my data code?
[quoted text clipped - 28 lines]
> >>
> >> Text='<%# Bind("Name") %>'

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.