If you need to share objects among all users, use the Cache object. If
you need to share objects specific to a particular user, use the Session
object.
Now, might I ask why you want to share a DataAdapter among different
pages? Nine times out of ten, the ideal approach in a Web environment
is to create/open/use/close the database connections *on each page*, and
NOT to attempt to cache such objects.
Sorry, my question was not clear.
I want to configure a dataadapter once and use it in the different pages in
design time, so I don't have to configure/reconfige the same dataadapter on
each page.
You can create a Component (an object that inherits from IComponent) that
contains the dataadapter. In that component you can set the properties (or
better get them from a configuration file/repository)
I already created a Component class and created a dataadapter there. Is this
what you mean?
But I don't know how to access this dataadapter from other classes (Web
pages). Is there an online tutorial about this?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.