Partial Page Rendering using Iframe

Partial Page Rendering using Iframe

Table::

.aspx File

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="pprender.aspx.cs" Inherits="myworks_pprender" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Partil Page Rendering</title>
    <script type="text/javascript">
    <!--
	    function showTable() {
		    hiframe.location="table.htm";
	    }
	    function removeTable() {
		    document.getElementById("tableId").innerHTML="";
	    }
    //-->
    </script>

</head>
<body>
	<iframe id="hiframe" style="visibility:hidden;display:none"></iframe>
	<table>
	<tr>
		<td>Table::</td>
		<td></td>
	</tr>
	<tr>
		<td colspan="2"><div id="tableId"></div></td>
	</tr>
	<tr>
        <td><input type="button" value="Show Table" onclick="showTable()" /></td>
        <td><input type="button" value="Remove Table" onclick="removeTable()" /></td>
	</tr>
	</table>
</body>
</html>

Rendered .htm File

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Untitled Page</title>
<script type="text/javascript">
<!--
function iframeLoad() {
	parent.document.getElementById("tableId").innerHTML = document.getElementById("tableId").innerHTML;
}
//-->
</script>
</head>
<body onload="iframeLoad()">
	<div id="tableId">
	<table>
	<tr>
		<td>1</td>
		<td>One</td>
	</tr>
	<tr>
		<td>2</td>
		<td>Two</td>
	</tr>
	</table>
	</div>
</body>
</html>

1 Responses to "Partial Page Rendering using Iframe"

  1. I0jiPY <a href="http://cfpntoflhveb.com/">cfpntoflhveb</a>, [url=http://ghalnoixdfcd.com/]ghalnoixdfcd[/url], [link=http://jtqxjqbkemnw.com/]jtqxjqbkemnw[/link], http://pibxdgjxaykw.com/

Leave a Reply