473,382 Members | 1,733 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,382 software developers and data experts.

Q: back and a button click does not fire page_load

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
2 2401
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dominosly | last post by:
Okay, this is a rather complicated problem, so here is the short of it: I am using a custom designed user control that simply writes out a plain old html submit button to the page. When the...
6
by: Michael Johnson Jr. | last post by:
I am trying to handle a button click event, which updates a web control table with data. The button is dynamically created in the table itself. When I call updateTable() in the Page_Load the new...
0
by: Dailan | last post by:
Hi, I create a tree view. Each node has link button associate with it, which includes add, edit, delete buttons. The way I did is for users who have very low capablity of using computer. Now I...
4
by: Mark Lingen | last post by:
I've found a problem with postback event handling and webcontrol buttons. Try out the following code in an ASP.Net project and you will see. Create a web project in VB.Net and drop this code...
1
by: Johan Nedin | last post by:
Hello! I am having a problem with the @OutputCache page directive and Web browser Back Buttons. Problem: After setting <%@ OutputCache Location="None" %> on my pages I get the "Warning!...
29
by: Tom wilson | last post by:
I can't believe this is such an impossibility... I have an asp.net page. It accepts data through on form fields and includes a submit button. The page loads up and you fill out some stuff. ...
1
by: Klaus Jensen | last post by:
Hi! This has been annoying me all day, and I can't get it to work It is really driving me nuts! Basicly this simple webapp created to illustrate my problem, renders five buttons, and adds a...
7
by: zdrakec | last post by:
Hello all: I note in my application, that when I use Server.Transfer("somepage.aspx"), when the new page is loaded, and I click the Back button on the browser, that the previous page, when it...
3
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
In the page_load event i need to see which event fired the post back. what here allows this. I specificly want to know if the enter key was pressed. but i need to check for others. -- (i''ll be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
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...

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.