Application behavior with Internet Explorer 7 settings

336 views Asked by At

I created a very simple ASP.NET application with one ASP.NET textbox control, ASP.NET button control and a ASP.NET gridview control.

When my client loads the application for the very first time, they enter in some text and press enter. The application does not load the results and clears the text box control. When they close their browser and re-open the application, it works as expected.

The cause of the weird behavior was their browsing history setting for "Check for newer version of stored pages" is set to automatically. When it is set to "Every time I visit the webpage", the application works the first time they load it in their browser.

What can I do programmatically to make it work everytime the client uses the application?

2

There are 2 answers

1
Zachary On

That's not normal, have you checked the date/time on the server to make sure it's correct? You can use meta tags to tell the browser not to cache the page, but since this is not the default behavior for a ASP.NET page, you'd be creating a working versus a fix. Regardless of what you decide to do, here is the meta tag to force no caching.

<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
1
Pavel Chuchuva On

Pressing enter in text box is not the same as clicking a button in the world of ASP.NET. Try clicking the button to see if it resolves the issue.

If it does set DefaultButton property of the form:

<form id="form1" runat="server" DefaultButton="Button1">

See Default Focus, Buttons and Validation Errors with ASP.NET 2.0 by Scott Guthrie.