Use the preventDefault() method on the event object to prevent a page refresh on form submit in React, e.g. event. preventDefault() . The preventDefault method prevents the browser from issuing the default action which in the case of a form submission is to refresh the page.One great way to prevent reloading the page when submitting using a form is by adding return false with your onsubmit attribute. You can use this code for form submission without a page refresh. I have done this in my project.
How do I stop page refresh on button click?
If you want to avoid full page refresh, then don’t use UpdatePanel control as it will only give more pain the butt. Instead, use AJAX with client-side grid (e.g jQuery grid, Webgrid, etc) and handle everything at the client (JavaScript code).
How do I stop a page from submitting?
The simplest solution to prevent the form submission is to return false on submit event handler defined using the onsubmit property in the HTML