[Fixed]-"Returning to that page might cause any action you took to be repeated" – Django


This message is from the browser; and it will display anytime you try to refresh a page that was displayed as the result of a POST request.

It has no bearing on your code, the browser will display the same message on all websites where you try to refresh the page (hit F5 for example) which was displayed as a result of a previous POST request.

To prevent this from happening, make sure all POST requests redirect to a different view upon completion; and not render templates themselves.


redirect to same page working for me :

header("Location: #");


Just redirect your page to current page after inserting
, it will clear all the values and avoid adding the Duplicate records !


protected void btnAdd_Click(object sender, EventArgs e)
 //your code 


Leave a comment