Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
To refresh the current record (refreshing will refresh this page with a blank page, so the user can either create a new record OR search for another record).

What I have tried:

$(document).ready(function () {
       $('#RefreshPage').click(function () {
           location.reload();
       });
   });


<input type="submit" id="RefreshPage" class="btn btn-primary" value="Refresh" name="Command"/>
Posted
Updated 19-Apr-17 9:57am
Comments
Bhola Ram Sahu 19-Apr-17 1:54am    
Redirect to the same page from controller as on button click event.
g.gouranga 19-Apr-17 2:31am    
you can use the following
instead location.reload();
window.location.href = "your current page url"
VenkataSeshu B 19-Apr-17 2:37am    
Hi gouranga
what is the diffrence between location.reload() and window.location.href

Try this:

window.location.reload();
 
Share this answer
 
Try this :
window.location.reload();
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900