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
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