asp.net and Back button

liunx

Guest
Hi ALL,
I need help on Back button (asp.net web application)
I have two pages first is list of dealers, second page is their data which can be toggled from cases to pounds - for example.
After I did toggling and hit Back button to the first page I see cached web page first from cases to pounds and only then after second hit on Back button I've got my list - first page. :-(
How can I clear history so that it will go right away without toggling again to my first page - which is list of brokers.
Thank youu can try 2 diff approach:
1) turn cache duration off - <%@ OutputCache Duration="0" VaryByParam="None" %>

2) instead of rely on the "back" button off the browser, how about put a "back" link (normal html link) and reqest a page back to the first page?
sirpelidor said:
u can try 2 diff approach:
1) turn cache duration off - <%@ OutputCache Duration="0" VaryByParam="None" %>

I was trying to do your first solution but run into some problem,
-------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The 'duration' attribute must be set to a positive integer value

Source Error:


Line 2: <%@ Register TagPrefix="cc2" Namespace="skmMenu" Assembly="skmMenu" %>
Line 3: <%@ Register TagPrefix="cc1" Namespace="GraphicsServer.GSNet.Charting" Assembly="GSNetWin, Version=1.1.1300.21363, Culture=neutral, PublicKeyToken=3bfdd1ece951dcfa" %>
Line 4: <%@ OutputCache Duration="0" VaryByParam="None" %>
Line 5: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
Line 6: <HTML>


Source File: D:\LabWeb\BrokerSales\BrokerSales.aspx Line: 4

-------------------------------------------------------------
please see attachment. Is there something I should add to it?
Thank youput: <%@ OutputCache Duration="0" VaryByParam="None" %> in the first line of ur aspx page.It does not work for me... :(
What version are you working with .net?Is it 2005?
I am on 2003 framework 1.1.change <%@ OutputCache Duration="0" VaryByParam="None" %>
to <%@ OutputCache Duration="0" VaryByParam="*" %>

see if it works2 sirpelidor:
Thank you for your help!
But it also does not work for me it fails on Duration ="0" saying that it supposed to be positive integer number.But it also does not work for me it fails on Duration ="0"

I'm not exactly sure why it doesn't work for you. however, I have other solution for you:

instead of playing with asp.net tag, u can just use standard html tag.

put:

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

between ur header
 
Back
Top