Do you encounter ViewState or PageState loss in your ASP.Net pages inside IFrame? In my project, I encountered this kind of issue maybe because I used PageStatePersister as the base class of my ASP.Net pages and together with AJAX. I tried to include SavePageStateToPersistenceMedium and LoadPageStateToPersistenceMedium overrided methods in my PageStatePersister base class, but it didn't help me either.
So, what I did is:
In the top of the ASP.Net Page Source Code, after the
Here is the Example:
<body>
<ajaxtoolkit:toolkitscriptmanager id="tsmMaster" runat="server" enablepartialrendering="true"></ajaxtoolkit:toolkitscriptmanager>
<asp:updatepanel id="UpdatePanel1" runat="server" updatemode="Conditional" rendermode="Inline">
<contenttemplate>
<asp:timer id="tmTimer" runat="server" interval="5000" ontick="tmTimer_Tick"></asp:timer>
</contenttemplate>
</asp:updatepanel>
...
...
...
</body>
Here is my conclusion:
Inside my IFrame, I noticed that the ViewState/PageState of my ASP.Net page always loss within less than 30 seconds without any execution/event in the page (imagine < 30 secs.).
Since every 3 secs the page is being PostBack using ASP Timer, it keeps the ViewState or PageState alive.
I hope this would help your problem in dealing with Iframe, AJAX and PageStatePersister in ASP.Net.
Thanks
Best Regards,
Shaper Jabneel