PC Review


Reply
Thread Tools Rate Thread

best way of using session variables to store datatable?

 
 
=?Utf-8?B?Vk1J?=
Guest
Posts: n/a
 
      29th Aug 2006
When my webpage loads the first time, I fill my datatable with records from
the DB and display them in my gridview. Once it loads, the user clicks on a
button and add records to the datatable, which also show up in the gridview.
When "Finish" is clicked, I'll insert the records into the DB.
Question: What's the best way to display the datatable (with the records
from the DB and the records that the user added through the page) into the
gridview after postback? And when the user's done, how can I know which
records from the datatable were added by the user?

Thanks
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      29th Aug 2006
VMI,
This is really an ASP.NET question (not a C# language question) and should
be directed to the ASP.NET group.

If your code really adds a new Grid row to the underlying datatable, you
should only need to get this out of session state and pass it to a
DataAdapter to update your database.
Peter


--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"VMI" wrote:

> When my webpage loads the first time, I fill my datatable with records from
> the DB and display them in my gridview. Once it loads, the user clicks on a
> button and add records to the datatable, which also show up in the gridview.
> When "Finish" is clicked, I'll insert the records into the DB.
> Question: What's the best way to display the datatable (with the records
> from the DB and the records that the user added through the page) into the
> gridview after postback? And when the user's done, how can I know which
> records from the datatable were added by the user?
>
> Thanks

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Session variables and static variables loss own contained value. neeraj Microsoft VB .NET 0 6th Sep 2006 01:33 PM
Accessing Session variables when using SQL Server for Session state Michael Microsoft ASP .NET 3 30th Dec 2005 07:56 PM
Session Variables assigned to the wrong session? =?iso-8859-15?Q?Fabr=EDcio_de_Novaes_Kucinskis?= Microsoft ASP .NET 1 20th Jan 2005 04:33 PM
Store Datatable in session Grey Microsoft ASP .NET 1 15th Jun 2004 10:46 AM
Re: Store Datatable in session Phil Winstanley [Microsoft MVP ASP.NET] Microsoft ASP .NET 0 15th Jun 2004 10:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:02 AM.