Hi,
I am working on a web project and using Details View to insert new records. The problem is when I click cancel and then try to refresh page it shows dialog box saying
To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier.
When I was searching on web to prevent this solution given was to use Response.Redirect to prevent this dialog box. But I am already using the same when user clicks on Cancel link. Following is my code
protected void DetailView_ItemCommand(object sender, DetailsViewCommandEventArgs e)
{
if (e.CommandName == "Cancel")
{
Response.Redirect("~/Authors.aspx");
}
}
I want to redirect to same page when user clicks on the Cancel link and stop the dialog box to appear. And in some other cases to prevent the reposting the same data on refresh.