.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Back & forward button of browser hide...

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :ASP.Net
Hiwithout script can i hide back & forward button of browser ..here lot of solution given but not working properly so please give me solutionthankscraj

View Complete Post

More Related Resource Links

Navigating Web Project with Browser's Back/Forward Button(s)


I am developing a web project in asp.net using vb and want to allow the user to navigate through my enrollment process using the Browser's Back and Forward buttons. Is this possible?


Thank you in advance.

Disable Back and Forward button in the IE and Mozilla browser


Hi every body

I want to disable back and forward button in the IE and Mozilla when my application (which is a WPF, XBAP project in the .Net 4.0) is deployed in a browser.

The main form is a System.Windows.Window. Please help me how can id do that.


Web Form breaks after using the browser's back button

I have a web form that allows a user to put some data in a textbox and click a button to do a search on that data.  It opens up a Sql Server Reporting Services report using the data they entered on the previous page.  If they use the browser's back button to go back and enter some different criteria to search on, the buttons don't work anymore. Any ideas or suggestions on what would cause this?   Thanks! 

Browser back button issue when ViewState stored in DB.

I implemented the solution of storing the ViewState in DB (since we were getting lots of Invalid & Corrupt Viewstate errors on our site daily) as given in the following website:http://weblogs.asp.net/adweigert/archive/2004/03/09/86628.aspxThe solution was implemented in one of the aspx pages on our site that behaves like a wizard (not using the wizard control though). After starting to store the viewstate in DB, the Invalid ViewState errors were eliminated completely, but I am now facing the following problem:1) User selects radiobutton1 of the two radiobutton choices on Page 2 of the wizard, a postback happens which displays some extra information on the page based on the selection. Now the user hits the next button on the page that also does a postback & displays Page 3.2) On Page 3, user hits the "back button" of the browser instead of the "previous page" button that is available on that page.3) This displays Page 2 from cache in original state(without any selections made). When user now selects radiobutton2, a postback is supposed to happen, but it does not. User then clicks "next" button on Page 2 (a postback does happen here however), & Page 3 is displayed, but it still thinks that radiobutton1 was selected (the original selection that was made in step1) on the previous page & hence displays information accordingly.I am assumi

Mobile redirect and the browser back button

Has anyone here ever successfully constructed a two-page mobile website with VB, one page for input and one page for displaying results?  If so, how do you call the results page and can you return to the input page using the back button on your mobile browser?  I have no problem creating such a website for regular browsers, but I simply cannot construct one for the iPhone or the Droid ... you can't return to the first page via the backbutton and still have it be functional; all you have is the graphics.  There is no load event for the page you're returning to.  It seems like mobile browsers don't handle server-side redirects properly.  If you open a new page via a hyperlink, you can return to the page you were on and it will still be functional; not so following a redirect to another page on your site. I've experimented endlessly with cache settings, redirect parameters, and the pagestatepersister class to no avail.  I need to know if I'm on a futile quest.  Can anyone offer confirmation for can do/can't do?    

Browser Back button

Hello,    Is there any way to know if the post back happen because of the broswer back button. Or I have a reapter control can i use response.redirect on a image to go to another page.Because i am using <a href now but problem is I want to know the previous page , for that i used URLRefferal but it is not getting the right page because it is a <a href not response.redirect.   Thank, 

how to disable back button of your browser

i want to know how can i restrict any user to access any webpage after logging out

ModalPopupExtender problem with browser back button


ModalPopUpExtender shows popup when user clicks browser back button.

I saw this thread but I could find the solution for this problem.


mesajrapor1 is my user control which contains the modalpopupextender

Here is my code:


protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
        HyperLink hyp = (HyperLink)e.Item.FindControl("hypGonderenAD");
        Label lblicer = (Label)e.Item.FindControl("lblIcerikMesaj");
        Label midlbl = (Label)e.Item.FindControl("lblIdMesaj");
        Label sidlbl = (Label)e.Item.FindControl("Label3");

        if (e.CommandName == "SikayetEt")
            mesajrapor1.RaporGonder(hyp.Text.ToString(), lblicer.Text.ToString(), Convert.ToInt32(midlbl.Text), Convert.ToInt32(sidlbl.Text));

disable back button of browser so that a user can't go on previous pages after signout


hi All

i am working in asp.net 2.0 with vb.net.

i want to disable back button of browser so that a user can't go on previous pages after pressing signout hyperlink.

i applied this code in load  event of page that i want to disable on back button of browser but it is not ing please help me in detail as soon as possible.





"Pragma", "no-cache")





Disable Browser Back Button Using Javascript ASP.NET


 Hi... Am using following script, disable back browser, it works well, only in Chrome, if i try ie it says .. Webpage has expired,   any simple method is there? but it should suitable for browsers !

<script type = "text/javascript" >
    function disableBackButton() {
    setTimeout("disableBackButton()", 0);

<body onunload="disableBackButton()">
Protected Overloads Overrides Sub OnPreRender(ByVal e As EventArgs)
        Dim strDisAbleBackButton As String
        strDisAbleBackButton = ""
        ClientScript.RegisterClientScriptBlock(Me.Page.[GetType](), "clientScript", strDisAbleBackButton)
End Sub

After logout is done check is made so that the browser back button does not retun to the last visite


Why this code not working.I want after logout is done check  the browser back button does not retun to the last visited page.

please help me.

 <script language = "javascript" type = "text/javascript">

         -- After LOGOUT is done,check is made so that the browser back button
         does not retun to the last visited page.
         -- The below function is called in OnClientClick of Login button
         function SetLogoutCookie(value) {
             var exdate = new Date();
             exdate.setDate(exdate.getDate() + 1);
             var expires = "; expires=" + exdate.toGMTString();
             document.cookie = "logout=" + value + expires + "; path=/";

On browser back button click again login in Application problem



In my project I am using the FormsAuthenticationTicket and maintain session when any user login in the application. On logout I am expire the seesion using Session.Abandon (); but when I click on the browser back button after logout it again login in the application. I want after logout if any user clicks on the browser back button it do not again login in the application it redirect it on login page. But I do not how it could be possible.


Below is my code


protected void btnLogon_Click(object sender, EventArgs e)


            propertyStore.BusinessLayer.Users objUser = new propertyStore.BusinessLayer.Users();

            if (objUser.IsAuthentic(txtUserName.Text, txtPassword.Text))



                FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(


Editor's Note: A Look Back As We Move Forward


Here's a look at a year's worth of coverage and changes at MSDN Magazine in response to reader requests.

Howard Dierking

MSDN Magazine January 2009

Infopath 2007 print view in browser enabled form with Print button


Hi i create a  print view brower enabled form in Infopath 2007 with header and footer. In Infopath works fine. Margin was ok, header and footter to. But then i try to print this browser the margin, header and footer it changes to default setting of browser ? I try also create a print button in form with VS 2008 code, but method :

this.print(); not working.

It is possible to print the "print view" in browser as the same like in Infopath 2007? Does anyone have the code how to create a print button in C# on browser enabled form?

Posting back a disabled button


Folks, I have a control which inherits from LinkButton and I'm trying to make sure that the user cannot cause mayhem by performing multiple postbacks.  That seemed an easy enough challenge, so I have this code [snippet] on the client:

ButtonClicked: function () {
    if (this._DisableOnClick == true) {
        this.get_element().disabled = 1;
        this.get_element().style.cursor = 'wait';
    else {
        alert('Posting back');

The alert is of course only there for debugging.  If the DisableOnClick value is false, then I see the "Posting Back" alert and, when I click ok, the postback occurs - all good.

If the DisableOnClick value is true, then the "button" gets disabled and the cursor turns into an hourglass - again good.  But the postback doesn't happen - not good.  I assume that the ASP client code is trying to help by preventing the postback when it sees that the link is disabled.

So, how can I either:

  • Persuade the LinkButton to postback even though it has just been disabled; or
  • [probably better] Get my client code to execute immediately after the postback code rather than before.



Back Button for Parent Report

Hello all, I have created a summary report and have the hyperlink set up to jump to another detail report. In BIDS, when I get to the detail report, there is an option to go back to the parent report. But when I publish these reports to Report Manager, that back button is not there. Does anyone know a workaround to this? I really want the user to be able to go back to the summary report when they are done looking at the details. We are working on SSRS 2005. Any help would be greatly appreciated.

Creating a "Save Button" in a browser based Form

I'm not sure if I'm missing something obvious, but I need to have the funtionality of the "Save Button", which is available and works on the tool bar, available in the form...and I can't seem figure out how to do it.I've found examples, in this forum, of how to use the "Submit Button" to act as the "Save Button", which did work for me, but only when specific basic criteria was met.The criteria that I now have is that I'm initiating a workflow to automatically start when a new item is created.  My workflow then moves the form to one of a few possible different form libraries, based on the logic in my workflow.  The different form libraries are to manage different teams of people that would have access to the Form and then that team would process the form accordingly.My specific situation: 1 - User opens a new form (works) 2 - User enters data and then submits the new form (works) 3 - Workflow is initiated and the form is moved to another form library to be worked on by a select group of people (works) 4 - The form is opened and reviewed and some changes are made to the form data by the select group of people (works) 5 - The form data in the form libary is updated (works, but only if the save button is pressed in the tool bar and then manually closes t
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend