Web Forms :: Disabling Browser Back Button With Display Of Alert Message?
May 28, 2010
In my application I have to use such like on clicking back button of the browser the current page should be there. it should not navigate to the previous one...Also there should appear a alert box which will prompt message of fear of losing some data.........
I want to do this by disabling the Cacheability ..
I have also tried disabling the cacheability but it's not working ...
I have a repeator control which is displaying the search results and it contains 50 Records.Paging is Enabled for the Repeator control and hence i am able to see 10 records at a time.
Now my requirement is :
When ever the user clicks the browser back button after going to the the Last set of records from the result set (41-50 records) in the Repeator Control,the Page is displaying the First set of Records(1-10).
Expected Result :
Page has to display the Previous result set (31-40) after clicking the browser back button.
Before I go the route of using hidden fields or something similar, is there any way to send back to the server changes to the disabled state of an ASP.net Button control? I have a Button that is initially enabled and I disable it via jQuery on the client. Works great. The only problem is when I do a PostBack the server still thinks the Button is enabled and sends back a response that changes it back to enabled. Why doesn't the ViewState send back the current disabled status of the Button? Is there a way to force it to postback the changes? Other ASP.net controls, like the CheckBox, do send back the state changes to the server. Seems odd to me.
Im using ASP.NET 2.0,C# for my web application development. I am having a login page and new user registration page. how to redirect to login page once user finishes his registration and clicks back button of browser. Registration page is container page using some master page..
Not sure if i'm posting in the right forum, if not, please move it...i have the following issue... I want to "disable" browser's back button. Seems it's not possible, but using cache.setcacheability and timing it, kinda disables the option of navigating back. I need this because in some pages of my webpage, i keep values in a Session variable so when a page loads, i need to check that variable, and, if navigating back, cant do that. I also "set cache to false" because if someone closes session, and i allow cache, someone else could handtype a url in that same pc and see the page without login (though if he/she tries to navigate through it will be kicked out because when loading a new page, i'll know that he/she is not logged) but i dont want to allow even that,
that's why cache is disabled. The problem is that loading over and over again my masterpage (header, footer, menu and stuff) is going to slow down the webpage, because every time there's a request, the page has to be sent again completely. So, is there something like a "mix" mode where i can allow cache just for a few things? If not, what's the best practice to achieve both things i'm trying: speed and security?
From pageA, clicking a button to open pageB which display a crystal report. User can only use browser back button. How to open pageC from pageB? Can I add code in pageB close (if there is a page close event) or make back button in browser to open pageC instead of pageA?
How should i handle browser Back and Forward button? I have aspx page . in aspx page has some field with Save Button. i have clicked on save button to save the data, then i clicked on browser back button, then it again execute the save button event. how should i prevent to fire save button event again when user clicked on Browser back button?
I have a Deafult.aspx page with a form and a button. The form consists of a drop down list and a radio button list. When I click the button I submit the form to a different page, search.aspx. When I click the back button in the browser. Somehow the radio button list values stay the same as when I last clicked them (not any special configuration by my side), and the drop down list gets back to its default value. My radio button list has a on select event that changes the values of the drop down list. The problem is, as I mentioned, the radio button list keeps its former value when I submitted the page, and the dropDownList doesn't. So they are incoherent.
How do I make them both get back to their default values? (as this is no postback... right?) or how do I keep their former values. FYI, the problem doesn't occur in internet explorer. In chrome this happens. And in fire fox, it just gets back the dropdownlist is ok, but the radio button list's default selected index isn't even selected.