0

I have a page that has two 'pages' within. Basically it's two DIVs - one is hidden at all times, and it is toggled dependent on a Radio button.

One of these DIVs contains a form which you can submit. I want this whole page, especially that form, refreshed when the user clicks 'back'.

I have tried numerous things, and none of them have worked. Maybe they are in the wrong place?

I currently tried this:

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <% Response.Cache.SetCacheability(HttpCacheability.NoCache); %>
    <%: Response.Expires = -1; %>

It still doesn't work. Help?

Cody
  • 8,686
  • 18
  • 71
  • 126

1 Answers1

1

Since the back button doesn't "reload" the page, this is the problem you are seeing.

You could add a "back button" or "link" which when clicked would obviously reload the page.

Also, look into the javascript onload event. You might be able to clear the form using that.

Jack Marchetti
  • 15,536
  • 14
  • 81
  • 117
  • I could, but I want to account for what happens when the user clicks on the actual back button..so the page needs to expire after it posts. – Cody Aug 17 '11 at 17:54
  • Not 100% but check to see if the javascript onload event fires. If so, write code in there that clears out the form. – Jack Marchetti Aug 17 '11 at 17:57
  • I have other JS in there, so I know it fires. I'm not looking to write more code to clear the form, I just need to know why the page is not expiring. – Cody Aug 17 '11 at 18:12
  • That's absolutely not helpful at all. – Cody Aug 18 '11 at 15:37