Sharing data across web forms?

  • Thread starter Mervin Williams
  • Start date
M

Mervin Williams

I am using Infragistics UltraWebTab (a tab folder control for ASP.NET). My
tab folder control will include five tab pages with a separate web form on
each, and these web forms will share data.

My questions regard the data tier, that is, how I should construct the data
objects so as to reduce memory usage while optimizing page performance?

1. I'll be using data sets. How can I share a single data set across the
multiple web forms?
2. Can the data adapters be shared across the pages?
3. If not, what is the memory overhead for having multiple identical data
adapters open?

Thanks in advance,

Mervin Williams
 
W

William Ryan eMVP

1) You can use Session State or create a shard class (class with all shared
methods in VB.NET or static memebers in C#) (use the shared if you want the
data shared by All users, if you want it specific to the individual, session
state will work
2) Yes, but no need to do it. They area perfect object to implement as
Shared or static since their logic is the same across classes
3) DataAdapters are never 'open'. They are declared, possilbly
instantiated, but the only thing that 'opens' is connections. Like anything,
use only as much as you need. However, the dataadapter doesn't give a hoot
about the data per se. It just looks to rowstate to decide what it's going
to do with something. So you can create your own data access layer with
pretty much the same configuration and pass different datasetsto it.

Remember that you can fill a dataset/datatable with one dataadapter and
update say 3 different databases with 3 other data adapters never using the
first one again. I divorces itself from the data as soon as fill/update etc
is complete.

HTH,

Bill
 
C

Cor Ligthert

Hi Mervin,

In addition to Bill, when you really want to save memory you can also use
the viewstate, however you are transporting that to the client of course.

Cor
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top