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

34πŸ‘

βœ…

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.

πŸ‘€Burhan Khalid

2πŸ‘

redirect to same page working for me :

header("Location: #");
πŸ‘€Faysal Hafidi

0πŸ‘

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

example:

protected void btnAdd_Click(object sender, EventArgs e)
{
 //your code 
 Response.Redirect("Currentpage.aspx",true);

 //or 
 Response.Redirect(Request.Url.AbsoluteUri);
}
πŸ‘€user3441369

Leave a comment