GridView not populating, but not all the time, clearing cache fixe

J

jjb3rd

I have essentially a working website. It has an Administration page, a
CreateUser page, a Login page, a HospitalAccess page (for searching for a
list of reports and displaying them in a GridView) and a FinalChart page
which displays the report the user clicks on in the HyperlinkBoundField in
the GridView from the HospitalAccess page.

So, essentially, we have a site with 2 user pages, Hospital Access handles
searching and displaying of results in a Sortable GridView with multiple
pages. The left-most column in the gridview is a hyperlink bound field
pointing to the finalchart page referencing the report id, whereupon the
report is displayed.

Simple enough and it works well....or so I thought until we went to deploy
this in our test environment and have the eventual end users start evaluating
it. Seemingly at random some users were getting our "No Records Found!"
message, indicating we got an empty result set, even though we should have
gotten results. So, I stayed up late, rewrote the whole thing essentially,
simplifying the whole site...we deploy to testing again...same thing. This
time around someone notices that clearing the browser cache fixes the
problem. This problem has cropped up on IE6, IE7, IE8, Google Chrome and
Firefox...I didn't try Safari long enough, but my guess is it would have the
same results.

Due to the clearing of the cache seemingly fixing the problem, I suspect
that it has to due with our use of session variables to save both the DataSet
of search results, as well as the sort column and order. Not sure how to
program around that without doing things really old school, which is fine,
but not really.

So, like I said, this thing works, even in the testing environment, but
after a while it stops working and you have to clear your cache to make it
work again...in any browser, on XP 32 bit and Win 7 x64 alike.

To further complicate things, some users (hospitals) have very restrictive
user policies (obviously) and some are still using IE6, so there's that.
 
G

Gregory A. Beamer

jjb3rd said:
Due to the clearing of the cache seemingly fixing the problem, I suspect
that it has to due with our use of session variables to save both the
DataSet
of search results, as well as the sort column and order. Not sure how to
program around that without doing things really old school, which is fine,
but not really.

Session variables get a bit nasty some times, but I think it is how you are
using cache, assuming you mean server cache. If the needs are quite variable
(different users see a different set), using cache may actually be
detrimental to your application, as you end up with a bunch of stuff in
cache. As the problem is intermittent, one suggestion is the cache is being
cleared for one user just as he clicks and the app thinks it is pulling a
"no record" from cache, as the cache is cleared. This is true of anything
with weak references.

Cache, in a UI sense, is best when there are a few sets of variables that
can display the item(s) that are cached. Once the list get to be a matrix,
cache is less and less useful and can end up being more of a headache than
an aspirin (a cure?).

If you mean browser cache, expire the page quickly and allow the list to be
hit each time, avoiding cache ... that is one option.


--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************
 
J

jjb3rd

If you mean browser cache, expire the page quickly and allow the list to be
hit each time, avoiding cache ... that is one option.

I mean browser cache...but after another conversation, it could be cookies.
It's a client side thing that seems to fix it.

I was using session variables to store the sort column, sort order, and the
dataview currently being viewed. I've just eliminated all of the session
variables, disabled sorting and paging. I'm curious if that is the culprit
here.

I'll try the page expiration as well (after I figure out how).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top