You're right, all those settings basically just tell the browser not to cache anything. If this is an intermittent error, you should look at the event logs on the server whenever it happens because all unhandled exceptions are logged there. It seems more likely that the problem occurs because the page crashes due to a lockup or access error on the server.
On Nov 11, 7:53 am, Dalton <[email protected]> wrote: > I have a C# form in framework version 3.5. It is in use by about 30 > people accessing via iPads, smart phones, and regular browsers and it > usually always works fine. > > Lately though, when people are submitting data, instead of the regular > submit process the page reloads and loses all the data that was on the > page. This only happens once every few weeks and is not following an > exact pattern of timing. Sometimes it comes back two days later; > sometimes a couple weeks. > > Here is my page load hook: > protected void Page_Load(object sender, EventArgs e) > { > Response.Cache.SetNoServerCaching(); > Response.Cache.SetNoStore(); > Response.Expires = -1; > Response.ExpiresAbsolute = DateTime.Now.AddDays(-2); > Response.CacheControl = ""; > Response.AppendHeader("Pragma", "no-cache"); > } > > I know that is a gamut of settings that are ill-advised but I have > been through several rounds trying to get this to work. The only > other event hooked is Page_LoadComplete, which only has basic > procedural logic. > > Does anyone have an idea why the page will initially load, let the > user enter data, and when they hit submit it sometimes loses all the > data and just reloads the page? -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net
