To display the webpage again, the web browser needs to resend the information

I got this warning message from Internet Explorer when an ASP.Net Page tried to do PostBack.

To display the webpage again, the web browser needs to resend the information you have previously submitted.

To display the webpage again, the web browser needs to resend the information


Cause

This issue usually occurs in case you are using Post method in your form tag with “location.reload” method as used below:


'onClosed': function() { window.location.reload(); }

Solution

First, change the form method in HTML file from POST to GETto avoid double form submitting




Although this solves this issue “To display the webpage again, the web browser needs to resend the information” but I can’t send a value using “QueryString” value in URL because of I am using reload function as shown below:


'onClosed': function() { window.location.reload(); }

So I changed window.location.reload() to window.location=’URL’


Note : If you are using a QueryString in URL and you don’t need to lose the current value after reloading, in this case, you should bind query string “?Lang=<%=Request.QueryString[“Lang”]%>” to “window.location” as shown below:

window.location='../Default.aspx?Lang=<%=Request.QueryString["Lang"]%>'


 

Advertisements

2 thoughts on “To display the webpage again, the web browser needs to resend the information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s