I don't know how to autoresize iframe on .cs page but It's another option like put your iframe in datalist control like...
<asp:DataList ID="dtlhtml" runat="server" Width="100%">
<ItemTemplate>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<iframe src='<%#Eval("html") %>' width="713" id="iframe1"
frameborder="0" onLoad="autoResize 'iframe1');">
</iframe>
</td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
Put javascript code as...
<script language="JavaScript">
function autoResize(id)
{
var newheight;
var newwidth;
if (document.getElementById(id))
{
newheight = document.getElementById(id).contentWindow.document.body.scrollHeight;
newwidth = document.getElementById(id).contentWindow.document.body.scrollWidth;
}
document.getElementById(id).height = (newheight) + "px";
document.getElementById(id).width = (newwidth) + "px";
}
</script>
And put on .cs page.
DataTable dt1 = new DataTable();
dt1.Columns.Add("html");
DataRow dr = dt1.NewRow();
dr["html"] = "";//Any dynamic url path
dt1.Rows.Add(dr);
dtlhtml.DataSource = dt1;
dtlhtml.DataBind();
NOTE:
This will not work in local host ..please try it on online.