473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

State managment

Vik
A Web page contains a search function, which fills out a dataset and stores
it in a Session state. A user can navigate through the stored records. If
the user opens a new browser window from the existing one and enters another
search criteria, then the new dataset overrides the dataset from the
previous window in the session state and both windows display the same
results though the search criteria look different.
When the dataset is stored in a view state loading the page takes forever.

How can I solve this problem? Should I retrieve data from a database every
time the page is loaded?

Thanks.
Nov 18 '05 #1
3 919
If these are your requirements, then yes. At any one time, you should only
retrieve the records you need though. So if you are display 10 at a time,
grab 1-10 the first time, when they hit Next, grab the next 10.

The other way you could do it, is to assign each page a new GUID on the
first page_load and store the GUID in viewstate. Then, if your session
variable name is "SearchResults", name it : GUID + "SearchResults". That
way there will be unique session variables for each page, since each one
will have a unique guid that it has created at start up. This works if you
don't mind having multiple sets of data in session at the same time.

"Vik" <viktorum@==hotmail.com==> wrote in message
news:ux**************@TK2MSFTNGP11.phx.gbl...
A Web page contains a search function, which fills out a dataset and stores it in a Session state. A user can navigate through the stored records. If
the user opens a new browser window from the existing one and enters another search criteria, then the new dataset overrides the dataset from the
previous window in the session state and both windows display the same
results though the search criteria look different.
When the dataset is stored in a view state loading the page takes forever.

How can I solve this problem? Should I retrieve data from a database every
time the page is loaded?

Thanks.

Nov 18 '05 #2
Vik
Thank you.

I already tried assigning PageID = Now. This works if a user opens the new
window before the page is posted back. After the page is posted back opening
the new window does not call Page_Load procedure, so PageID remains the same
as on the first page.

Vik

"Marina" <so*****@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
If these are your requirements, then yes. At any one time, you should only retrieve the records you need though. So if you are display 10 at a time,
grab 1-10 the first time, when they hit Next, grab the next 10.

The other way you could do it, is to assign each page a new GUID on the
first page_load and store the GUID in viewstate. Then, if your session
variable name is "SearchResults", name it : GUID + "SearchResults". That
way there will be unique session variables for each page, since each one
will have a unique guid that it has created at start up. This works if you don't mind having multiple sets of data in session at the same time.

"Vik" <viktorum@==hotmail.com==> wrote in message
news:ux**************@TK2MSFTNGP11.phx.gbl...
A Web page contains a search function, which fills out a dataset and

stores
it in a Session state. A user can navigate through the stored records. If the user opens a new browser window from the existing one and enters

another
search criteria, then the new dataset overrides the dataset from the
previous window in the session state and both windows display the same
results though the search criteria look different.
When the dataset is stored in a view state loading the page takes forever.
How can I solve this problem? Should I retrieve data from a database every time the page is loaded?

Thanks.


Nov 18 '05 #3
For each search query, save the results in a file on the applicaton
server. When the user page through these results, you can just read
from the file instead of querying the database again.

With each unqiue search query in a separate file, the user can have
multiple view of the same data without having to constantly query the
database.

You can also have a component running in COM+ under a user that has
write permissions on the web server to save the files.

Tommy,

"Vik" <viktorum@==hotmail.com==> wrote in message news:<ux**************@TK2MSFTNGP11.phx.gbl>...
A Web page contains a search function, which fills out a dataset and stores
it in a Session state. A user can navigate through the stored records. If
the user opens a new browser window from the existing one and enters another
search criteria, then the new dataset overrides the dataset from the
previous window in the session state and both windows display the same
results though the search criteria look different.
When the dataset is stored in a view state loading the page takes forever.

How can I solve this problem? Should I retrieve data from a database every
time the page is loaded?

Thanks.

Nov 18 '05 #4

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

Similar topics

4
by: Jorge_Beteta | last post by:
Hello, I work for an attorney staff, so basically the whole day they are sending themselves a lot and a lot of papers (Word docs or Excell sheets). We are going to propose them the use of a...
2
by: Jason Davis | last post by:
Hi there, Is anyone familier with an access managment system for orders? Something simple like products, alphabetic list of clients and archive of ordered products. Thanks! Jas.
4
by: Oscar Onorato | last post by:
Hello colleagues: Somebody know that good alternatives I have, in addition to the cookies, to maintain the session state? Where an example of it can be seen? Thanks
4
by: fm | last post by:
We are using State Server to host our session objects. We have several applications running under IIS that will be using the State Server. How can one of those applications clear its Session...
3
by: Eirik Eldorsen | last post by:
I'm starting a project where I willl need an Ad Managment solution. Could someone recommend me a product? -- Eirik
0
by: Ben Fidge | last post by:
Is is possible to enable cookieless sessoin state managment on a per sessoin basis? Most of our customers have cookies enabled, however, for those that don't it would be nice to switch to...
1
by: Neo | last post by:
hi, This is my first post in C++ group, so please be nice to me. Thanks. Also, I will post my first C++ program following. There is a compile error, I cannot figure it out even I can fix it. And...
2
by: Daniel | last post by:
Hi, I have a question regarding the memory managment in stl stacks. I want to use stacks to store a very large amount of numbers (some millions), thus I'm interested in how the stack behaves...
1
by: kalid2002 | last post by:
I have treid alot to do this program Library managment system by java Contiguous Array but i fount alot of defficulties so i hope any one could help me
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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,...

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.