Results 1 to 3 of 3

Thread: Why can "page not be refreshed without resending information"?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Posts
    122

    Question Why can "page not be refreshed without resending information"?

    I have an ASP.NET page with an IFRAME. The IFRAME contains the second ASP.NET page. I need to be able to click on an "update" button on the page within the IFRAME and have the browser refresh. Lord_Rat provided me with the following code to do this.

    Code:
            JavaScript = "<script language=""javascript"">" & vbCrLf
            JavaScript += "parent.location.reload();" & vbCrLf
            JavaScript += "</script>"
            Response.Write(JavaScript)
    The code works, but the problem now is as follows:

    When I run the application, the first time the page loads, I can click the "update" button on the page within the IFRAME and the parent page will reload with the update in effect. However, if I click on any of the controls on the main page and then try to use the "update" button, I get the following message from IE:

    "The page cannot be refreshed without resending the information. Click Retry to send the information again, or click Cancel to return to the page that you were trying to view."

    Is there any way to remedy this problem?

  2. #2
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    Your parent page should not contain any server side controls. If you want it to, then you need a third, even higher page. Refresh that page.

    You see, when a post back occurs, the system does the post back by setting some values on a hidden form elements and then POSTing the form. Then, when you refresh, the page would have to be posted again.

    In the page I created to do all of the refreshing, the parent is simply a frameset page.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Posts
    122
    Oh...I see. That makes sense. So, I guess I can just add a new page that can act as the high-level parent and will only contain an IFRAME in which my current parent page is displayed. That should take care of the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width