Hello Morgan,
Welcome to the MSDN newsgroup.
From your description, you're developing an ASP.NET 2.0 page which contains
several radiobutton lists, and these list will be bound to some datas
retrieved from database(through some data access classes configured in
objectdatasource). currently, you're wondering what's the recommend way to
configure the objectdatasource for those databound radiolists(one
objectdatasource per radiolist or share a single objectdatasource)
,correct? If anything I didn't quite get, please feel free to let me know.
As for this question, I think it mostly depend how your data access helper
class is designed. For example, whether the data access methods(query,
update, delete....) are class's instance methods or static methods, or is
the class has expensive construction or initializating code for creating
each instance?
1. If the class define those data access functions as instance methods,
then each objectdatasouce use this class will construct a new instance of
this class. In such scenario, it is recommended to share one
objectDataSource if possible(especially when each class instance's
constructing and initializing is expensive).
2. If you do not quite concern about the things in #1, then, either single
objectdatasource or mutiple ones is possible. For example, when the data
accessing methods are static methods of the helper class, objectdatasource
won't create any instance at runtime, so multiple datasources won't add
much overhead(from the data access class).
Just some of my understanding. If you have any other concerns or ideas,
please feel free to post here.
Regards,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)