|
-
Feb 20th, 2005, 06:26 PM
#1
Thread Starter
Frenzied Member
How to handle the cache and datasets??
I have been given an asp.net app with about 20 webpages, all using datagrids and a method for binding a dataset to the grid. it also has a simple DAL. Now, one of my tasks is to improve performance. So I figured caching the datasets was a good way to start. But, for most of the pages, all postbacks are caused by the user changing the search parameters and a new dataset has to be fetched from the DAL. That means caching is relativly useless? What do you think? Should I pursue it?
Also... one of the requirements, lets call it "nr 2" was that they want some pages to maintain viewstate between response.redirects... The users are tired of having to reselect search parameters when they press the "back button" (causing a hard coded response direct)
ANy suggestions how to solve it? As far as I know, viewstate for server controls are not maintained when the context changes? Am I wrong?
/Henrik
-
Feb 20th, 2005, 06:41 PM
#2
Retired VBF Adm1nistrator
Re: How to handle the cache and datasets??
In relation to postbacks, you can use a simple piece of code:
VB Code:
Sub Page_Load( ... )
If Not IsPostBack Then
End If
End Sub
So. Just do the SQL stuff once, store into the cache, and then that's that.
In relation to storing user preferences, there are lots of ways of doing it. How are users selecting parameters, by tickboxes on forms or textboxes or what?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Feb 21st, 2005, 01:11 PM
#3
Thread Starter
Frenzied Member
-
Feb 21st, 2005, 04:48 PM
#4
I wonder how many charact
Re: How to handle the cache and datasets??
Well, the search criteria could not be that big correct?
I mean - you have a few true/falses, number ranges perhaps, or a few strings?
You can save those parameters into viewstate - or if you're worried about context, have you looked into attaching that information in to a cookie?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|