i am using ASP.NET 2008 for my application with IE-7 browser..but browsers back button does not reflect on previous page on single click.. it reflect on previous page on double click.. plz reply me how to make it in single click? i m using process bar at the time of processing..
29 12223
Please rephrase your question.
I do not understand what you mean when you are referring to "single click" and "double click".
Please remember that when the user clicks the web browser's back button it displays a cached version of your web page.
This means that if your user preformed a "double click" (??) that displayed something client side this would be cached by the web browser. If the user hits the back button, this cached version of the page will be displayed.
Look into using meta tags to control how your page is cached in the browser....look into setting your page's content to expire as soon as it's displayed...look into setting the no-cache tag
eg: -
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE, must-revalidate, max-age=0">
-
<meta http-equiv="expires" content="0">
-
<meta http-equiv="Pragma" content="no-cache">
You should research the topic of browser caching to better understand how to implement the best solution for your application.
explain more abt the double click issue, coz am on a project also but i only have to click once to get back to the previous page
if i double click on back button then page will back on previous page... but it's not happening on single click...
i want to go back in single click...?
gits 5,390
Expert Mod 4TB
do you have a redirect on the previous page that is instantly triggered when the page loads?
kind regards
Do you have an asp button in your page that is called "back button"?
If so, in the button click event, are you redirecting as Gits has mentioned?
no .. i d'nt have any back button.. i am talking about the browser back button .. and i want to go back on previous page on single hit on browser back button..?
Ok I know what's happening.
You have an aspx page and the user does stuff on it. The page does a full page submit to the server, and the previous version of the page is stored in the browser's history. So, when you hit the back button you will see one of these pages.
To get around this you can wrap your page's content in an UpdatePanel. Then the page will do an asynchronous post back to the server instead of a full page post back. Thus, page's history will not be stored in the browser's history and you will be returned to the previous page with "one click of the back button".
(Please note that the UpdatePanel requires a ScriptManager to be on the page in order to work)
-Frinny
thanx.. but i am using asp.net application,, does not using ajax in our application... plz tell me with example how to use update panel and script manager..?
plz rply me as soon as possible...........????????
What version of the .NET framework are you developing with?
What version of Visual Studio are you working with?
i think .. this is not the problem of browser caching...if it is the issue of caching ,, then why it navigate back on double click on back button.. i am using master page in my application because of that it takes twice hit to go back on previous page first for master and second for content page,........ plz tell me how to navigate on previous page in single click... i am working visual studio 2008......
You aren't making sense, a MasterPage is compiled along with a Content Page in order to create a whole web page. Why would you only be shown the MasterPage when hitting the back button???
The browser's back button controls web pages that the browser has cached in it's history. If you have to hit the browser's back button twice that means that the web page has been cached in the browser's history two times....this is an indication that the user has made a page submit 2 times to the server.
Since you are using Visual Studio 2008, you should have an UpdatePanel control available to you in your ToolBox (in the AJAX Extensions section).
If you don't want your page to cache in the browser's history, then wrap your page's content in an UpdatePanel....
Any content in the UpdatePanel will cause a partial page update (preform an asynchronous call to the server). This means that only a portion of the page will be updated...in your case, all of your page's content will be refreshed during the partial page update. Since there is no full page postbacks happening, nothing will be stored in the browser's history when the user is using your page.
You could wrap your content in an UpdatePanel on each page or could do this in your MasterPage: -
<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="MasterPage.Master.vb" Inherits="Mynamespace.Master" %>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml" style="height:95%;width:97%;">
-
<head Id="Head1" runat="server">
-
<title></title>
-
</head>
-
<body>
-
<form ID="Form1" runat="server">
-
<asp:ScriptManager Id="MyScriptManagerInstance" runat="server"></asp:ScriptManager>
-
<asp:UpdatePanel ID="MyUpdatePanel">
-
<ContentTemplate>
-
<asp:contentplaceholder Id="PageContent" runat="server">
-
</asp:contentplaceholder>
-
</ContentTemplate>
-
</asp:UpdatePanel>
-
</form>
-
</body>
-
</html>
-
if i make a button on my page like that... - <input type="button" value=" <-- BACK " onclick="history.go(-1);return false;" />
it takes two click to navigate back...
if i am using - <input type="button" value=" <-- BACK " onclick="history.go(-2);return false;" />
then it goes back in single click..... is there any coding or setting for so this can apply for browser back button....
when i put asp:ScriptManager in my master page it is giving me error that
ScriptManager is a unkown tag...????
I thought you said that you were using the browser's back button?
That you didn't have a button on your page named "back"....?
Either way, this is just proving that there are 2 pages stored in the browser's history...
In regards to the unrecognised tag.....what .NET Framework is your application being developed for?
Please post your asp code.
this is the code for master page.... -
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
-
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
<html xmlns="http://www.w3.org/1999/xhtml" >
-
<head runat="server">
-
<title>Integrated System</title>
-
<link href="StyleSheets/Menu.css" rel="stylesheet" type="text/css" />
-
<link href="StyleSheets/MenuStyle.css" rel="stylesheet" type="text/css" />
-
<link rel="stylesheet" type="text/css" href="Stylesheets/default.css" media="screen"/>
-
<link href="StyleSheets/FormStyle.css" rel="stylesheet" type="text/css" />
-
-
-
</head>
-
<body onbeforeunload="busyBox.Show();" bgcolor="white" background="Resource/bg.gif">
-
<form id="Form1" runat=server>
-
<asp:ScriptManager Id="MyScriptManagerInstance" runat="server"></asp:ScriptManager>
-
<script language="javascript" src="JavaScript/CastleBusyBox.js"></script>
-
<table width=60% class = "pageHeader">
-
<tr width =100%>
-
<td align="right" style="height: 37px" width="2%">
-
</td>
-
<td style="width: 30%; height: 37px">
-
<asp:Image ID="Image1" runat="server" BackColor="Transparent" EnableTheming="False"
-
Height="30px" ImageUrl="~/Resource/zodiac_1.GIF" Width="324px" /></td>
-
<td align="left" style="height: 37px" width="20%" >
-
<asp:Label ID="versionLbl" ForeColor="white" Font-Bold="true" runat="server" Font-Names="Arial" Font-Size="10pt"></asp:Label>
-
</td>
-
<td width = 40% align = right style="height: 37px"><asp:Label ID="userLabel" runat="server" Text="Welcome : " Font-Names="Arial" Font-Size="9pt"></asp:Label><asp:Label ID="loggedUserLabel" runat="server" Text="Not Logged In" Font-Names="Arial" Font-Size="9pt"></asp:Label>
-
|
-
<asp:HyperLink ID="HyperLink2" Font-Bold=false runat="server" NavigateUrl="~/MainMenu.aspx" Font-Names="Arial" ForeColor=blue Font-Size="9pt">Home</asp:HyperLink>
-
|<asp:LinkButton ID="logoutLBtn" runat="server" OnClick="logoutBtnClickEvenHandler" ForeColor="Blue">Logout</asp:LinkButton>
-
</td>
-
<td align="right" style="height: 37px; width: 8%;">
-
</td>
-
</tr>
-
<tr style="width:100%; height:5%">
-
<td colspan="5" valign=top align=center class=menuTD>
-
<asp:Menu ID = "MainMenu" runat="server" Orientation="Horizontal" EnableViewState="False" CssSelectorClass="PrettyMenu" DataSourceID="SiteMapDataSource1" Width="100%" style="cursor: hand" EnableTheming="True">
-
</asp:Menu>
-
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
-
</td>
-
</tr>
-
<tr width="100%" height=10px>
-
<td align="left" colspan="5">
-
</td>
-
</tr>
-
</table>
-
<asp:UpdatePanel ID="MyUpdatePanel">
-
<ContentTemplate>
-
<div>
-
<asp:contentplaceholder id="Core" runat="server">
-
</asp:contentplaceholder>
-
</div>
-
</ContentTemplate>
-
</asp:UpdatePanel>
-
</form>
-
</body>
-
</html>
and also having some code master.cs file on pageload event for loginuser... no i am not using any back button.. i was just made for checking for what actually happens.... i want on browser back button
The ScriptManager class is part of the System.Web.UI namespace. It belongs to the System.Web.Extensions assembly (in System.Web.Extensions.dll). Make sure that this assembly is registered in your web.config file.
In your web.config, in the <assemblies> section you should have the following entries: -
<assemblies>
-
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=...."/>
-
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=...."/>
-
</assemblies>
-
no .. in our application does not have above assembly.. how to add this assembly in my application ... and wat about the public key..? and after adding this assembly ..error remains same....
Create a new web application....
Try adding an UpdatePanel to the page.
If it works properly, go to the web.config and merge the <assemblies> section in with your application.
I hope that you are aware of the nature of the UpdatePanel.... anything within an UpdatePanel will perform a partial page update (an Ajax call).
Since this is the case, any JavaScript that is used by the controls within the UpdatePanel has to be registered with the ScriptManager.
The ScriptManager is responsible for managing all JavaScript/Ajax and StyleSheet resources used by the controls that participate in partial page updates (Ajax calls).
but in same application i added a page without inherited master page .. then i linked this page to login page... after click on link .. i navigated on new blank page... here the back button working fine... i.e. navigate on previous page on single click... ......?
Ok, for now, forget I mentioned the UpdatePanel.
It sounds like something else is going on here.
At one time you said that when you hit the back button you are brought to the "MasterPage"....
Could you please elaborate on this because I do not know what you're talking about here...
as u asked ... IN start browser back button is looking enabled. and browser forword button is looking disabled ..if i click on browser back button ..page remains same but browser forword gets enable... and again click on browser back button then page is redirected on previous page....
do u suggest me or provide some code.. so that i can navigate back to previous two pages on click of browser back button only for my application.???? it should change this property only for my application ....
So, your first page is the Login page....
The next page is some content page...
In your Login page, MasterPage, or Content page, do you have a Redirect happening?
If so, please post any methods that contain a redirect.
no .. i am talking about browser back button functionality.. i d'nt want to use any other back button... plz tell me how to use browser back button useful in single click... in my application ..it is being in double click.....
in other application browser back button working fine.. i want only to improve browser back button functionality...
... plz watch my master page code....where code is that
.<body onbeforeunload="busyBox.Show();"
this code caching the cuirrent page ,,
how to remove only current page from browser histry... i d'nt want to remove previous page from caching...so that i can go back on single click. actually in my application(asp.net) browser is caching the current page so that when i click on browser back button, page remain same.. if i double click on browser back button then it navigate to previous page...where code is that
I'm getting same issue:
Using master pages and Ajax. I have back button in app and when using history.back() the page stays on the same page, but when using history.go(-2) it goes back to previous page.
The browser back button has the same effect...if I click the browser back button then it stays on the same page, but if I double click the browser back button it moves to the previous page. The pages are visible in the browser history and selecting the previous page in the history takes you to the previous page correctly.
This is ONLY experienced in IE, Firefox works fine!
So there's a workaround for the application navigation, but this does not sort out the root of the problem.
I've found my problem. We using Response.Write(<script language='javascript'> window.location='" + URL + "';</script>) to redirect in order to set the statuscode (200) and description (OK). If we use response.redirect then the browser back button works on single click (or history.go(-1)).
The javascript redirect does not show in the browser history, but will cause the first "back" to re-run the javascript leaving you on the same page. Firefox obviously handles this intelligently and ignores the javascript redirect.
Thanks a lot for sharing your answer Andrewr :)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Ralph Freshour |
last post by:
Is it possible to inhibit the browser Back/Fwd buttons via PHP?
Thanks...
|
by: Tony Marston |
last post by:
If the use of the browser's BACK button is interfering with the operation of
your web application then take a look at this article entitle "Back Button
Blues"
...
|
by: Peter D. Dunlap |
last post by:
Hello,
I realize that this may not be the best place to ask this question,
through the application is asp.net. I also realize that questions
about disabling the back button are generally met...
|
by: John A Grandy |
last post by:
asp.net 1.1
ie 6
how to lock-out the user from clicking the browser "Back" button ?
|
by: Shimon Sim |
last post by:
Hi,
Every time I write ASP.NET application I have the same problem - Back button
on the browser is my enemy. I have to tell client avoid using "Back" button
and if you use it make sure to refresh...
|
by: Tom wilson |
last post by:
I'm developing an application that is a benefits enrolment website.
The benefits can be of any type in any order as stored in a SQL
server. On each page is a Back and Next button. At a certain...
|
by: guoqi zheng |
last post by:
In a regular html form, when user press "enter" key, the form will be
submitted.
However, in ASP.NET web form, a form will only be submitted (post back) when
a special button is clicked. Many...
|
by: Liming |
last post by:
Hi,
I have a multiview (with 10 views inside). Now on View2, I ask the
user to uplaod a file and click Save to go to View3 and once they get
to view3? If the user hits my "previous" button,...
|
by: ns21 |
last post by:
How can the browser back button be disabled If the form is submitting
information to other pages or submitting to itself or using
redirections.
I tried the tweaks like history.forward(1) in each...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |