static DataTable as DataSource for DataGrid

Discussion in 'ASP .Net Web Controls' started by preetith@hotmail.com, Nov 13, 2003.

  1. Guest

    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
     
    , Nov 13, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. J. Babe
    Replies:
    1
    Views:
    8,425
    Kevin Spencer
    Aug 15, 2003
  2. Fredrik Rodin

    Sort a datatable and create a new datatable

    Fredrik Rodin, Feb 16, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    9,111
    paul.mariotti
    Sep 28, 2007
  3. =?Utf-8?B?Qmx1ZWZsb3dlcg==?=

    Casting DataTable to class inherit from DataTable

    =?Utf-8?B?Qmx1ZWZsb3dlcg==?=, Apr 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,034
    =?Utf-8?B?Qmx1ZWZsb3dlcg==?=
    Apr 2, 2004
  4. jg
    Replies:
    1
    Views:
    755
    =?Utf-8?B?U2hhaWxlc2ggSmFubnU=?=
    Aug 17, 2004
  5. JC
    Replies:
    2
    Views:
    254
    James Crane
    Sep 30, 2004
Loading...

Share This Page