getting a webresponse stream into iframe - trouble
<p>hey again stackoverflowers</p>

<p>I'm migrating a website from old ASP (in VBScript) and there's certain stuuf I have to iFrame as to keep the old stuff working inside a new container. </p>

<p>on the aspx page I have an iFrame with the runat="server" attribute to make it available in the code behind file.</p>

<pre><code>&lt;iframe id="frmLoader" runat="server" scrolling="auto" width="100%" height="600px"&gt;&lt;/iframe&gt;
</code></pre>

<p>now the issue, to get certain functionality I have to POST to a page (from the old site) to make it render differently and thus provide a response to the POST.</p>

<p>the following code resides in the Page_Load with of course parameters in the postData object</p>

<pre><code>byte[] encData = new ASCIIEncoding().GetBytes(postData);

req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.ContentLength = encData.Length;

Stream dataStream = req.GetRequestStream();
dataStream.Write(encData, 0, encData.Length);
dataStream.Flush();
dataStream.Close();

WebResponse res = req.GetResponse();
StreamReader sr = new StreamReader(res.GetResponseStream());
string s = sr.ReadToEnd();
frmLoader.InnerHtml = s;
</code></pre>

<p>the pain here is that I can't seem to render the string into the iframe. 
with debugging I checked whether something should appear and it should, but it doesnt :p</p>

<p>anyone know how I get the string parsed into the iframe?</p>

<p>additionally, when triggering functionality in the iframe, the page should stay there, with the response to additional posts from the original site (old asp)
I've been looking, but not finding answers.</p>

<hr>

<p>creating a handler would mean I have to create a custom handler for every old page I wish to use then?</p>

<p>I'm not that experienced in in-depth webdevelopment :)</p>

<p>in old ASP the previous developers put a lot of functionality into 1 page and by using the post message I can call upon these functions, rendering a different page each time.</p>

<p>can a handler, like you said, be built to accept a bunch of parameters to vary the post?</p>

<p>EDIT:</p>

<p>I just noticed another problem here. the handler does not have access to the session in which data resides to make the post I need it to. there's a different post per action ...</p>
