Active Server Pages Programming (ASP)/Data in memory

Advertisement


Question
QUESTION: Hello,

In ASP if you have a grid on a page where the user will be adding data (rows). How can all the rows of data be kept in memory until the user saves them to the database?

Thanks in advance,

Richard

ANSWER: Hi,

You need to look in to sessions, this looks like a good article:-
http://www.dotnetspider.com/resources/20462-Bind-Gridview-from-Session-Then-Edit

its done using VB.NET is this ok?

Thanks



---------- FOLLOW-UP ----------

QUESTION: Hi Ashley,

One prob I foresee with keeping the data in the session, is that when the user leaves the page, the data stays in the session. How can the application detect when the user leaves the page?

Thank you in advance,

Richard

Answer
Hi,

There is no full proof way of detecting if a user has left the site or closed the browser window.

I think by default the sessions clear/expire after 20 mins.

I've been looking for away to do this myself. In the global.asax on session start I would log the user in, but when they left/closed the end session would get executed.

Sorry I couldn't be more help.  

Active Server Pages Programming (ASP)

All Answers


Answers by Expert:


Ask Experts

Volunteer


Ashley Brazier

Expertise

Main focus is ASP, SQL Server 2000 & 2005

Experience

Over 6 years experience.

Education/Credentials
BCs Honours Software Design and Networks

©2012 About.com, a part of The New York Times Company. All rights reserved.