Last post Mar 06, 2017 08:52 PM by KathyW
Mar 06, 2017 04:58 AM|ashokkumar9892|LINK
I am using iframe but keep refreshing , its keep reloading again again. i dont know how to avoid reload event. below is my code:
below is code:
<asp:Content ID="Content4" ContentPlaceHolderID="mainContent" runat="server">
<asp:ScriptManager ID="ScriptManager1" ClientIDMode="Static" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" ClientIDMode="Static" runat="server">
<div class="navbar navbar-default contentTitleArea" style= "position: absolute; align-content:center;margin-left:1px; margin-right:1px;width:100%;">
<h3 id="header" runat="server" style="text-align:left;margin-bottom:-200px;font-size:24px;font-weight: 500" class="contentTitleText">Public Health Agencies</h3>
<iframe style="width:100%; margin-top:1px;height:900px" visible="true" src="http://docs.google.com/gview?url=http://www.pdf995.com/samples/pdf.pdf&embedded=true" id="myIframe" runat ="server"></iframe>
Mar 06, 2017 08:22 AM|raju dasa|LINK
Try using different site url in iframe, check if it's refreshing here too.
If it's not refreshing then the issue might be from content of docs.google.com site.
Mar 06, 2017 08:34 AM|KathyW|LINK
If I put that code in a simple aspx page, it does not keep refreshing. What else is going on in your page? If you are posting back, it will refresh.
If you have controls doing postbacks, put those controls in an update panel, and take the iframe out of it.
Mar 06, 2017 11:44 AM|ashokkumar9892|LINK
you right , if you put on only .aspx page not refersh, but on master page refresh happening.
only refresh when i keep iframe with google.doc inside
Mar 06, 2017 08:52 PM|KathyW|LINK
Using a master page does not change my response. If the page posts back (it doesn't matter if the controls that are posting back are put on the page from a master page or if they are in the child page), the iframe will refresh - unless those controls
are inside an UpdatePanel. The iframe itself should not be in an updatepanel: an updatepanel will not prevent an iframe from refreshing when the page posts back.