Re: Business objects with no properties and data binding
Paul van Brenk <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Message-ID | <[email protected]> |
Why are the objects designed this way... just asking, maybe there is
something I'm missing.
I would do this:
public class State
{
private String _abbr;
private String _name;
public String Abbr
{
get{ return this._abbr; }
}
public String Name
{
get{ return this._name; }
}
}
-----Original Message-----
From: Discussion of building .NET applications targeted for the Web
[mailto:[email protected]] On Behalf Of Alex Ivanoff
Sent: Thursday, March 01, 2007 22:20
To: [email protected]
Subject: [DOTNET-WEB] Business objects with no properties and data
binding
Is it possible to data bind a web control (DropDownList) to a list of
business objects which do not have properties but accessor methods
instead:
public class State
{
private String _abbr;
private String _name;
public String GetAbbr()
{
return this._abbr;
}
public String GetName()
{
return this._name;
}
}
Thank you,
Alex
===================================
This list is hosted by DevelopMentor(r) http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com