The preview does work correctly in the visual studio environment but not on our qa server.
I have this code in the Template1.aspx page
<html>
<head runat="server" id="Head1">
<title>Posted Values</title>
<link href="http://cutesoft.net/AgentStyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="1" cellspacing="0" cellpadding="3" style="border-collapse:collapse;width:400px;">
<tr style="color:white;background-color:steelblue">
<td>Name</td>
<td>Value</td>
</tr>
<%foreach(string key in Request.Form.AllKeys){%>
<tr>
<td><%=HttpUtility.HtmlEncode(key+"")%></td>
<td><pre><%=HttpUtility.HtmlEncode(Request.Form[key]+"")%></pre>
</td>
</tr>
<%}%>
</table>
</body>
</html>
And this code in the InsertTemplate.aspx
<iframe id="framepreview" src="../Template1.aspx"></iframe>