Noobie question: best way to maintain a list?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Todd said:
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!
*************************************************
 
Thanks a bunch. Works great!

Cowboy (Gregory A. Beamer) said:
Database. SQL Express is one that is free.


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


No need


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!
*************************************************
 
Back
Top