By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,992 Members | 934 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,992 IT Pros & Developers. It's quick & easy.

Q: back and a button click does not fire page_load

P: n/a
Hello,
I have two apsx pages, and I set a session variable in asp1 and click to a
button to go to aspx2. In aspx2, I use this session variable in the query and
show data on the datagrid. I do this in the page) load without any post back
check. My problem is: each time I click button and go to aspx2, it is always
previous data shown in the data grid (as if cash is brought and query is not
performed), when I click refresh in the internet explorer, right data is
shown. It seems to me page_load is aspx2 is not launched again if I click
back in IE and click my button again to come back to aspx2. What is
problem/solution?
Thanks,
Jim.

Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Jim,
I had seen this this isssue happening on my machine as well during one of
the project.

Can you double check the IE properties
Goto IE options on General tab ,
Select Temporary internet Files group and click on Settings.. button.
Settings dialog box will open make sure that, you have selected radio button
for Check for newer versions of stored pages:
Every visit to the page.

For me , after selecting this radio button resolved the issue.

Harish
Internet

"JIM.H." wrote:
Hello,
I have two apsx pages, and I set a session variable in asp1 and click to a
button to go to aspx2. In aspx2, I use this session variable in the query and
show data on the datagrid. I do this in the page) load without any post back
check. My problem is: each time I click button and go to aspx2, it is always
previous data shown in the data grid (as if cash is brought and query is not
performed), when I click refresh in the internet explorer, right data is
shown. It seems to me page_load is aspx2 is not launched again if I click
back in IE and click my button again to come back to aspx2. What is
problem/solution?
Thanks,
Jim.

Nov 19 '05 #2

P: n/a
This will ensure the page doesn't get cached, which seems to be your
problem.

Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"JIM.H." <JI**@discussions.microsoft.com> wrote in message
news:8F**********************************@microsof t.com...
Hello,
I have two apsx pages, and I set a session variable in asp1 and click to a
button to go to aspx2. In aspx2, I use this session variable in the query
and
show data on the datagrid. I do this in the page) load without any post
back
check. My problem is: each time I click button and go to aspx2, it is
always
previous data shown in the data grid (as if cash is brought and query is
not
performed), when I click refresh in the internet explorer, right data is
shown. It seems to me page_load is aspx2 is not launched again if I click
back in IE and click my button again to come back to aspx2. What is
problem/solution?
Thanks,
Jim.

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.