473,803 Members | 3,428 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

why I need to click refresh button in order to see session values

Hi all,
Recently, I just found out that our program behaves differently from before.

in our asp, in order to prevent data disppearing problem in form fields,we
use session variable to display the field values if a customer click "back"
button on the page2.asp in the browser,(the session variables
Session(aQuoteN ame(iPerson)&"T ripCost") is set up in the page2.asp) i.e.
then in the page1.asp, we use:
<input name="<%=aQuote Name(iPerson)& "TripCost" %>" type="text" size="6"
value="<%=Sessi on(aQuoteName(i Person)&"TripCo st")%>">
to display the tripcost. This works very well in the past all the time. But
today, when I do the similar programming, whenever I click "back" button on
page2.asp, the data on the page1.asp all disappeared and I have to click
"refresh" button on page1.asp in order to display all the session variables.
What's going on, does this have to have something to do with window security
patches, I didn't have anything changed in the program or IIS configuration.
I also test the production version, same thing happened which it never
happend before???
Can you shed a light on me?
--
Betty
Mar 20 '07 #1
5 2662

"c676228" <be****@communi ty.nospamwrote in message
news:35******** *************** ***********@mic rosoft.com...
Hi all,
Recently, I just found out that our program behaves differently from
before.
>
in our asp, in order to prevent data disppearing problem in form fields,we
use session variable to display the field values if a customer click
"back"
button on the page2.asp in the browser,(the session variables
Session(aQuoteN ame(iPerson)&"T ripCost") is set up in the page2.asp) i.e.
then in the page1.asp, we use:
<input name="<%=aQuote Name(iPerson)& "TripCost" %>" type="text" size="6"
value="<%=Sessi on(aQuoteName(i Person)&"TripCo st")%>">
to display the tripcost. This works very well in the past all the time.
But
today, when I do the similar programming, whenever I click "back" button
on
page2.asp, the data on the page1.asp all disappeared and I have to click
"refresh" button on page1.asp in order to display all the session
variables.
What's going on, does this have to have something to do with window
security
patches, I didn't have anything changed in the program or IIS
configuration.
I also test the production version, same thing happened which it never
happend before???
Can you shed a light on me?
Are you sure it was working before? The browser is not obliged to re-fetch
the previous page from the origin server when you hit the back button. In
fact in my experience it rarely does.

Mar 20 '07 #2
Hi Betty,

As for the behavior you mentioned, I've try testing it on my local side and
seems haven't been able to repro the exact same symptom. Have you tried
visiting that page from different client machine to see if you'll get the
consistent result?

One thing I could get is the client-browser caching, however, normally
client cache will also display the input values from previous view. Anyway,
you can try add the following like code snippet to disable client cache for
your input page to see whether it can help some.
=============== =============
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<%
pStr = "private, no-cache, must-revalidate"
Response.Expire sAbsolute = #2000-01-01#
Response.AddHea der "pragma", "no-cache"
Response.AddHea der "cache-control", pStr
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitl ed Page</title>
</head>
<body>
<form id="form1" method="post" action="test.as p">
<input id="Text1" name="Text1" type="text" value='<%= Session("Text1" )
%>' />
<input id="Text2" name="Text2" type="text" value='<%= Session("Text2" )
%>' />
<input id="Submit1" type="submit" value="submit" />

</form>

</body>
</html>
=============== ==============

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

=============== =============== =============== =====

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 20 '07 #3
Yes, Anthony. It worked perfectly fine. The reason I am 100% sure is before
we never used session variables to retain field values in the form and a lot
of customers complained about and I fixed that long time ago after using
session variables and shocked yesterday, it doesn't work that way anymore.
--
Betty
"Anthony Jones" wrote:
>
"c676228" <be****@communi ty.nospamwrote in message
news:35******** *************** ***********@mic rosoft.com...
Hi all,
Recently, I just found out that our program behaves differently from
before.

in our asp, in order to prevent data disppearing problem in form fields,we
use session variable to display the field values if a customer click
"back"
button on the page2.asp in the browser,(the session variables
Session(aQuoteN ame(iPerson)&"T ripCost") is set up in the page2.asp) i.e.
then in the page1.asp, we use:
<input name="<%=aQuote Name(iPerson)& "TripCost" %>" type="text" size="6"
value="<%=Sessi on(aQuoteName(i Person)&"TripCo st")%>">
to display the tripcost. This works very well in the past all the time.
But
today, when I do the similar programming, whenever I click "back" button
on
page2.asp, the data on the page1.asp all disappeared and I have to click
"refresh" button on page1.asp in order to display all the session
variables.
What's going on, does this have to have something to do with window
security
patches, I didn't have anything changed in the program or IIS
configuration.
I also test the production version, same thing happened which it never
happend before???
Can you shed a light on me?

Are you sure it was working before? The browser is not obliged to re-fetch
the previous page from the origin server when you hit the back button. In
fact in my experience it rarely does.

Mar 20 '07 #4
Superb, Steven, your code works perfectly fine. After I cut and pasted that
part into my page1.asp. It behaves as I expected. Can you recommand me
several resouces(web site, book etc.) that I can refer that part of
knowledge. Response.AddHea der...
You are my lucky star.
--
Betty
"Steven Cheng[MSFT]" wrote:
Hi Betty,

As for the behavior you mentioned, I've try testing it on my local side and
seems haven't been able to repro the exact same symptom. Have you tried
visiting that page from different client machine to see if you'll get the
consistent result?

One thing I could get is the client-browser caching, however, normally
client cache will also display the input values from previous view. Anyway,
you can try add the following like code snippet to disable client cache for
your input page to see whether it can help some.
=============== =============
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<%
pStr = "private, no-cache, must-revalidate"
Response.Expire sAbsolute = #2000-01-01#
Response.AddHea der "pragma", "no-cache"
Response.AddHea der "cache-control", pStr
%>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitl ed Page</title>
</head>
<body>
<form id="form1" method="post" action="test.as p">
<input id="Text1" name="Text1" type="text" value='<%= Session("Text1" )
%>' />
<input id="Text2" name="Text2" type="text" value='<%= Session("Text2" )
%>' />
<input id="Submit1" type="submit" value="submit" />

</form>

</body>
</html>
=============== ==============

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

=============== =============== =============== =====

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 20 '07 #5
Thanks for your reply Betty,

I'm glad that the suggestion is of assistance. I'm not sure about any books
on classic ASP since ASP.NET is currently popluar for web application
dev:). For resource site, I think the FAQ site below is quite good:

http://tutorials.aspfaq.com/

You can find many useful suggestion for classic ASP there.

BTW, I've also point it in your another thread "multiple image button
submit..."

Hope this also helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 21 '07 #6

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

Similar topics

9
4927
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST == "") { include ("InsertRecord.inc"); // Insert new record }
3
1594
by: Mike | last post by:
Hey guys I am pulling my hair out on this problem!!!!! Any help or ideas or comments on how to make this work I would be grateful! I have been working on this for the past 4 days and nothing I do seems to get me any closer to the solution. Below is a program that I am working on for a class project. The original code was provided for us which is what I have below. What we have to do is make the app run so that it allows the user to add...
1
2520
by: Jenny | last post by:
Need urgent help for an unsolved problem. In our ASP web application, we creat a Back button and if user click on this button, it execute history.go(-1) to go back to the previous page. All our users use IE 6.0 and most of them don't have problem with this button. But one user reported everytime he click on this button, there is a pop-up window shows up and ask him refresh and reload the page, after he clicks OK, the previous page will be...
14
7196
by: Sinity | last post by:
Anyone knows the method/codes to disable the clicked button after first click by using .aspx-- to prevent people to click many time when waiting for the server response. I tried to do this by adding a java script for the button. But, useless.. Please help! Thank you
1
1181
by: Edward | last post by:
I have an aspx page with 2 web usercontrols (ascx). The first user control (example a.ascx) has two buttons. Clicking the first button sets a Session variable "myVar" to "but1", the second sets the same variable to "but2". The other ascx-module uses the session variable "myVar" to determine what to display. When I click button 1 (or 2), the other ascx-module doesn't change his contents. When I click the button for the second time or click...
2
1525
by: Pop | last post by:
Hi all! Here's the situation I have a frame set with 3 frames, banner, contents and main. I have my login.aspx in banner and after login, I redirect back to index.aspx where my frameset at. There should be some change on banner and main but it didn't happen, I need to press F5 in order for the change to take place. Here's the change: banner : disable login button and enable logout button main : change the frame source to other page.
2
5010
by: Max2006 | last post by:
Hi, I have a simple form with a button on it. After a button click postback, anytime user press F5 (browser page refresh), the button's OnClick event handler is called again without the button actually be pressed! Is this a bug in ASP.NET? Is there any technique to prevent that? I know that a Response.Redirect to the same page solves the issue, however because of some requirements; it is not an option for me.
1
4932
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category order, Input field and a submit button. The Category name is being fetched from the oracle db along with the corresponding Category order. In the corresponding input field (text box) the user enters a new category order which gets stored in...
4
3591
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category order, Input field and a submit button. The Category name is being fetched from the oracle db along with the corresponding Category order. In the corresponding input field (text box) the user enters a new category order which gets stored in the...
0
9700
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10068
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9121
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7603
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.