static DataTable as DataSource for DataGrid

P

preetith

Hello,
I have a DataGrid on a page and the DataSource to
this DataGrid is a DataTable.This DataTable is obtained
from a static property in that class.My intention of
making this DataTable static is to prevent it from going
to the database on every postback.

On every postback I bind the datagrid to the static
DataTable.I get the data from the database and set the
static DataTable only a few conditions.

Since static property is a class property , I have the
following questions :
1.When will the static DataTable be garbage collected ?
2.If there are 2 simulataneous browser instances of this
page , will the changes in one reflect on the other ?
3.What general care has to be taken to avoid problem with
static properties ?

thankx
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top