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

During developing ASP.Net solution,I got this warring message from Internet Explorer when the Page tried to do PostBack .

Errorrendering

Firstly I tried to change the form method in HTML file from POST to GET .

<form id="form1" runat="server" method="get">

Now it’s working properly,but I can’t send QueryString value in URL.

I checked the code again and I discovered that I was using a JavaScript code in “OnClosed” FancyBox event as shown below:

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

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


Note : If you use a QueryString in URL and you need to don’t lose the current value after reload so you should use

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

Enjoy 🙂

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s