473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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 1982
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
1
by: Bo Xu | last post by:
Object of Combination By Bo Xu Introduction A combination of n things, taken s at a time, often referred as an s-combination out of n, is a way to select a subset of size s from a given set of...
0
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
5
by: Vicky via DotNetMonster.com | last post by:
Hi, I need help with "An object reference is required for the nonstatic field, method, or property 'dataReader.Class1.data'" Before I put folowing variable in class level, it works fine....
5
by: Greg | last post by:
Hi, I have been unable to resolve this error message: Object Ref not set to an instance of an object. The issue is that I cannot determine which object reference is causing the problem. ...
0
by: Roman | last post by:
I'm trying to create the form which would allow data entry to the Client table, as well as modification and deletion of existing data rows. For some reason the DataGrid part of functionality stops...
3
by: Adriano | last post by:
Hello, when I try to print something, either DataGrid or from Crystal Report viever the folowing error message appears and cancels printing: Object reference not set to an instance of an...
6
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1)...
2
by: swathi amireddy | last post by:
Hi, Im working on migration of one proj from .Net1.1 to2.0 in that some pages are unble to run; on Debug i havent obeserved ani error at any line but in IE .getting this error ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.