Noobie question: best way to maintain a list?

Discussion in 'ASP .Net' started by =?Utf-8?B?VG9kZA==?=, Oct 23, 2006.

  1. On an Asp.Net webpage, what's the best way to go about managing a list of
    items?

    When editing a library title I display a DataGrid of authors to which I'd
    like to be able to add and remove. Ideally, I'd like to be able to work with
    the list within a single page and not save the list until pressing an OK
    button.

    Should I keep a list of record IDs in a Session variable? Or postback the
    list of IDs in the Request? Is there a way to hang onto a DataTable between
    postbacks?

    Thanks for any help,
    Todd.
    =?Utf-8?B?VG9kZA==?=, Oct 23, 2006
    #1
    1. Advertising

  2. "Todd" <> wrote in message
    news:...
    > On an Asp.Net webpage, what's the best way to go about managing a list of
    > items?


    Database. SQL Express is one that is free.

    > When editing a library title I display a DataGrid of authors to which I'd
    > like to be able to add and remove. Ideally, I'd like to be able to work
    > with
    > the list within a single page and not save the list until pressing an OK
    > button.


    You can store the datatable in ViewState or Session between clicks./

    > Should I keep a list of record IDs in a Session variable?


    No,.

    > Or postback the
    > list of IDs in the Request?


    No need

    >Is there a way to hang onto a DataTable between
    > postbacks?


    Yes, in ViewState. Be careful that you do not run into the native way
    ViewState works, however, or you will delete records only to have them
    reappear and visa/versa.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    http://gregorybeamer.spaces.live.com

    *************************************************
    Think outside of the box!
    *************************************************
    Cowboy \(Gregory A. Beamer\), Oct 23, 2006
    #2
    1. Advertising

  3. Thanks a bunch. Works great!

    "Cowboy (Gregory A. Beamer)" wrote:

    >
    > "Todd" <> wrote in message
    > news:...
    > > On an Asp.Net webpage, what's the best way to go about managing a list of
    > > items?

    >
    > Database. SQL Express is one that is free.
    >
    > > When editing a library title I display a DataGrid of authors to which I'd
    > > like to be able to add and remove. Ideally, I'd like to be able to work
    > > with
    > > the list within a single page and not save the list until pressing an OK
    > > button.

    >
    > You can store the datatable in ViewState or Session between clicks./
    >
    > > Should I keep a list of record IDs in a Session variable?

    >
    > No,.
    >
    > > Or postback the
    > > list of IDs in the Request?

    >
    > No need
    >
    > >Is there a way to hang onto a DataTable between
    > > postbacks?

    >
    > Yes, in ViewState. Be careful that you do not run into the native way
    > ViewState works, however, or you will delete records only to have them
    > reappear and visa/versa.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    > http://gregorybeamer.spaces.live.com
    >
    > *************************************************
    > Think outside of the box!
    > *************************************************
    >
    >
    >
    =?Utf-8?B?VG9kZA==?=, Oct 23, 2006
    #3
    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. Lucas Tam
    Replies:
    2
    Views:
    420
    John Rivers
    Aug 27, 2005
  2. Larry Page
    Replies:
    1
    Views:
    623
    Robbe Morris [C# MVP]
    Sep 16, 2005
  3. Bucco
    Replies:
    3
    Views:
    456
    Volkm@r
    Jul 22, 2005
  4. Bit Byte
    Replies:
    1
    Views:
    836
    Teemu Keiski
    Jan 28, 2007
  5. Aaron

    What is the best way to maintain synchrony?

    Aaron, Apr 21, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    348
    Aaron
    Apr 21, 2004
Loading...

Share This Page