ASP.NET

Moderators: None (Apply to moderate this forum)
Number of threads: 1727
Number of posts: 3292

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Detecting the Browser-Refresh Button click from C# web form Posted by shani.safeer on 2 Jul 2006 at 4:21 AM
Hi,

In my web application (C#.Net and Asp.net), there is a button which when clicked will add one record to the database table.
But when the browser-refresh button is clicked, the same record is added again after displaying the Retry-Cancel dialog box.
So i would like to detect Refresh button click from the code.

It will b very much helpful to me if u can provide an easy solution.

Thanks 'n Regards.
Report
Re: Detecting the Browser-Refresh Button click from C# web form Posted by iwilld0it on 3 Jul 2006 at 6:57 AM
By default there is no event that fires when a page is refreshed. This is the nature of web browsers.

However, w/ some trickery:

http://joel.net/code/refresh_capture.aspx
Report
Re: Detecting the Browser-Refresh Button click from C# web form Posted by shani.safeer on 5 Jul 2006 at 8:36 PM
: By default there is no event that fires when a page is refreshed. This is the nature of web browsers.
:
: However, w/ some trickery:
:
: http://joel.net/code/refresh_capture.aspx
:

Thank You



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.