Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 25th, 2007, 06:46 AM
Registered User
 
Join Date: Jan 2007
Location: Ahmedabad, Gujarat, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to amitnet
Default Asp.net Disable "Back" of window wirh coding

Hi friends,
I m devoloping website for online examination in ASP.net and i want to disabale "Back" option of the window so send me code if you have
  #2 (permalink)  
Old February 13th, 2007, 02:23 PM
Friend of Wrox
 
Join Date: May 2006
Location: Northampton, United Kingdom.
Posts: 107
Thanks: 1
Thanked 8 Times in 7 Posts
Default

Technically I don't believe you are allowed to disable the back button in the browser.

Given that you are creating an examination system one solution is to set a session variable counting the questions answered and on page load if they are trying to load a page with a lower number than the previous quiestion (by pressing back) then send them back to the correct page, or an error trapping page, if you want to warn them.

  #3 (permalink)  
Old February 16th, 2007, 05:09 AM
Friend of Wrox
 
Join Date: May 2006
Location: Northampton, United Kingdom.
Posts: 107
Thanks: 1
Thanked 8 Times in 7 Posts
Default

Sorry, I forgot to mention that to force the page load you may also need to set the cache expiry

Response.Cache.SetCacheability(HttpCacheability.No Cache)

So that the user then has to press refresh.



  #4 (permalink)  
Old February 19th, 2007, 10:18 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

You can do this with javascript.. there are plenty of exampls online

  #5 (permalink)  
Old March 2nd, 2007, 12:37 AM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Use HtmlHIdden control.When you click submit button,in clientside, say Hidden1.value = 1.if Hidden1.value !=1; document.reload.That's all.

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding scrolling text with VS 2005/ASP.NET cJeffreywang ASP.NET 2.0 Professional 6 August 15th, 2007 07:28 AM
Sending a mail from a flash with asp.net coding waikiat86 ASP.NET 2.0 Basics 3 June 28th, 2007 10:47 PM
How to disable back button of IE? Edward King Javascript 0 November 8th, 2004 02:22 AM
ASP.Net Code Behind & In-Line Coding vinod_pawar1 General .NET 4 October 8th, 2004 02:33 AM



All times are GMT -4. The time now is 11:49 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.