473,473 Members | 1,739 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Best place to hold dataset between postbacks?

I have a page with a datagrid that is bound initially to a dataset. As the
user changes items on the grid, I want to cache the changes until a final
submit. Ideally I wish to update the dataset on each postback and at the
end, submit the changes to the database. But where should I store the
dataset? I can put it into the viewstate, but that gets very large, or I can
put it in a session object. Which of these two is better? Are there any
other alternatives?

Thx
Nov 17 '05 #1
1 3249
In most situations Session state would likely be the best place. Remember
to deallocate when you're done with it so it will eat a minimal amount of
memory. Even then it will take a significant amount of server memory for a
while, which will put limitations on the scalability of your app. Using
viewstate would offload some of that work to the client, but will increase
your bandwidth needs. Another option would be to use a staging table in the
database to save between each request. Of course this puts more load on
your SQL Server.
It's all about trade offs. No matter how you do it, the work has got to go
somewhere, in some tier. Pick one. How about the least used one?

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Gandalf" <ga*****@sauron.com> wrote in message
news:uV*************@TK2MSFTNGP10.phx.gbl...
I have a page with a datagrid that is bound initially to a dataset. As the
user changes items on the grid, I want to cache the changes until a final
submit. Ideally I wish to update the dataset on each postback and at the
end, submit the changes to the database. But where should I store the
dataset? I can put it into the viewstate, but that gets very large, or I can put it in a session object. Which of these two is better? Are there any
other alternatives?

Thx

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Chuck Ritzke | last post by:
I keep asking myself this question as I write class modules. What's the best/smartest/most efficient way to send a large object back and forth to a class module? For example, say I have a data...
16
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
1
by: Jim Shank | last post by:
I am adding support to my application for Oracle 10g and using Enterprise Library Data Access Application Blocks and trying to determine the best way to convert the GUID's which are stored as...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
2
by: Kiran | last post by:
Hi, This is something weird I noticed recently in ASP.Net. I have created typed dataset and I have filled the data. when a postback happens, the data of the dataset is lost. Is there a...
5
by: Richard Fagen | last post by:
Hi Everyone, I have been writing xBase applications for many years but I am new to VB/SQL for larger applications. In xBase, I would start the main program (form) by opening up all the...
1
by: phl | last post by:
Hi, I have some data in an xml file which I need to use in my web form. The data in the xml file needs to be shown in maybe a repeater, grid or data control. I will need to parse the data make...
7
by: =?Utf-8?B?cGF0cmlja2RyZA==?= | last post by:
Hi everyone? Which is considered to be the 'best' way to cache a dataset and/or a crystal reports reportdocument object? ViewState? Session? Something else? Thanks in advance!
9
by: alexandis | last post by:
I have a big database, a lot of tables, so I will have a lot of pages where i create a new record. There will be a lot of 'reference' items - let's say 'Create user' -> 'Select user type'...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.