How to avoid cache in asp.net iframe page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tanyali
    New Member
    • Feb 2007
    • 43

    How to avoid cache in asp.net iframe page

    Hi,

    I am using asp.net and c#
    i have an iframe within a page PageA.
    the source file for the ifram is page PageB.

    I type in some text and press search from PageA, the result will be displayed in the iframe.
    The problem is when I search for the same text string a second time, the result come out straightaway without executing the search action, which is because of the cache.
    I want to avoid the cache in the page.
    I tried to add code to the parent page PageA
    <meta http-equiv="pragma" content="no-cache" />
    in the aspx page, and
    Response.Cache. SetCacheability (HttpCacheabili ty.NoCache);
    in the aspx.cs page
    and neither works.

    Any ideas ?

    Thanks,

    Tanya
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    What you appear to want to achieve is a postback every time the page searches. Are you using ispostback? Here is a related post, suggest searching the site:
    How do I force a postback in the codebehind?

    Comment

    Working...