Click here to Skip to main content
13,252,195 members (62,103 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 10 Oct 2011

Prevent firing button click event when refreshing the page

, 10 Oct 2011
Rate this:
Please Sign up or sign in to vote.
Prevent firing button click event when refreshing the page
During development we can come across this issue. I found many solutions about this issue. However i found an easy solution for this.

I add the following line of code in my button click event and it resolves the problem.


It prevents firing the button click event when we refresh the page.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Sandesh M Patil
Team Leader
India India
Sandesh has a 8 years of total professional experience in a software development. He first handled the computer in his school days when he was in 7th std working on Lotus. In summer vacation, the school authorities allowed him and other students to use the computers for practicing Lotus and playing different games Smile | :) .

He has done computer engineering. Currently he is working in Net 4.0 framework. Even though he is using .Net 4.0 framework for development but still he has not got a chance to work with newer technologies like MVC, WCF etc. However he always try to learn these technologies from his end and eagerly waiting for a chance to work with the newer technologies like MVC, WCF and Silverlight etc.

You may also be interested in...

Comments and Discussions

QuestionThank you Pin
Dilan Fdo27-May-14 0:06
memberDilan Fdo27-May-14 0:06 
AnswerRe: Thank you Pin
$andesh M Patil28-May-14 0:22
member$andesh M Patil28-May-14 0:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171114.1 | Last Updated 10 Oct 2011
Article Copyright 2011 by Sandesh M Patil
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid