Using master page with iframe for content page

Though iframe is no more used in modern web programming. HTML5 and CSS3 is buzz now a days. Some prefer using update panel for their whole content page. There are many ways to handle the post backs of pages for better efficiency.

Here, I am giving a good sample for using master pages with iframe for containing content pages. If you are willing to use iframe container for your content pages, then below template or example is for you. Otherwise you can go for update panel or some other architect.

<head id="Head1" runat="server">

 <%--JS and style link etc --%>

</head>
<body>

<form id="form1" runat="server">
<asp:ScriptManager ID='scriptManager' runat='server' AsyncPostBackTimeout='500'>
</asp:ScriptManager>

<div class="itIsForyourHeaderPortion">

<asp:UpdatePanel ID="updMenu" runat="server" UpdateMode="Conditional">
<ContentTemplate> <div id="menuBar"> <asp:Literal ID="ltlMenuBar" runat="server" ></asp:Literal> </div> </ContentTemplate>
</asp:UpdatePanel>

</div>

<div class="mainContainerHereYouCanKeepYourIframe">

<iframe frameborder="0" id="myMainFrame" name="myMainFrame" marginheight="0" marginwidth="0" width="100%"></iframe>

</div>

<div class="youcanKeepYourFooters">

</div>

</form>

</body>
</html>

Hope it would help you.

Thanks