---
title: "stop refreshing page on button click"  
description: "stop refreshing page on button click"  
author: "Anonymous User"  
published: 2013-04-02  
updated: 2013-04-02  
canonical: https://www.mindstick.com/forum/696/stop-refreshing-page-on-button-click  
category: "asp.net"  
tags: ["asp.net", "c#", "mindstick", "free open source", "stop refreshing page"]  
reading_time: 1 minute  

---

# stop refreshing page on button click

Hi Mindstickians!\
I need to make the asp [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) to not [refresh](https://www.mindstick.com/forum/12865/how-to-refresh-dropdownlist-but-keep-old-selected-value-json) the whole page when I [click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) it.\
my [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) is just to make a [picture](https://answers.mindstick.com/qa/38554/name-the-oscar-winning-sound-designer-who-became-the-first-asian-to-win-the-award-for-best-sound-for-documentary-india-s-daughter-at-the-coveted-motion-picture-sound-editors-63rd-annual-golden-reel-awards) change to another picture but the [index](https://www.mindstick.com/blog/198/index-in-sql-server) of the picture is set in the [page load](https://www.mindstick.com/articles/12909/how-to-open-first-time-popup-on-page-load-in-website) [method](https://www.mindstick.com/forum/166/webservice-method). And every time you click the button \
to go to the next picture index, the whole page refreshes and calls the page load method. That then sets the index back to 0.\
how can I make the page stop calling the page load method when I click a button\
Thanks in [advance](https://www.mindstick.com/blog/33258/jee-mains-and-jee-advance-exams)!

## Replies

### Reply by AVADHESH PATEL

Hi Ankita!\
set button event property as below\
OnClientClick="return false;"and that will stop it from posting back the [page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page). This will allow you to do whatever it is you need to do. Now, if you're already running JavaScript in that \
click, which it appears you might be, just return false; from that method.


---

Original Source: https://www.mindstick.com/forum/696/stop-refreshing-page-on-button-click

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
