Dynamically creating a page in C# asp.net (php example included)
<p>I'm working from some sample code, provided in PHP - we are using c#, so i'm having to convert it.
Basically, it requires that i submit a bunch of data to an API, which returns an xml document as a response.</p>

<p>I then need to redirect to a page, that has the following HTML:</p>

<pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Redirect Test Page&lt;/title&gt;
&lt;/head&gt;
&lt;body OnLoad="OnLoadEvent();" &gt;

&lt;form name="downloadForm" action="ACS_URL_GOES_HERE" method="POST"&gt;
    &lt;input type="hidden" name="PaReq" value="PAREQ_GOES_HERE"&gt;
    &lt;input type="hidden" name="TermUrl" value="TERM_URL_GOES_HERE"&gt;
    &lt;input type="hidden" name="MD" value="MD_GOES_HERE"&gt;
&lt;noscript&gt;
    &lt;center&gt;
     &lt;h1&gt;Processing your 3-D Secure Transaction&lt;/h1&gt;
     &lt;h2&gt;JavaScript is currently disabled or is not supported by your browser.&lt;/h2&gt;&lt;br&gt;
     &lt;h3&gt;Please click on the Submit button to continue the processing of your 3-D secure transaction.&lt;/h3&gt;
     &lt;input type="submit" value="Submit"&gt;
    &lt;/center&gt;
&lt;/noscript&gt;
&lt;/form&gt;
&lt;script language="Javascript" &gt;
&lt;!--    
function OnLoadEvent(){
    document.downloadForm.target = "myIframe";
    document.downloadForm.submit();
}
//--&gt;
&lt;/script&gt;
&lt;hr&gt;
&lt;iframe src="blank.htm" name="myIframe" width="390" height="450" frameborder="0"&gt;
&lt;/iframe&gt;
&lt;hr&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>(the Uppercase variables (ending in _GOES_HERE) above are going to be passed in from the response XML document)</p>

<p>This page, once loaded, submits, and puts the result in the iFrame - called "myIframe"</p>

<p>That's basically it!</p>

<p>I'm having great trouble doing something like this in C# -
in PHP: they have this:</p>

<pre><code>function RedirectToACSPage ($doc, $data_set) {
// error_log ("Call RedirectToACSPage");
// error_log ($doc-&gt;get("Response.CardTxn.ThreeDSecure.pareq_message"));
$pareq = $doc-&gt;get("Response.CardTxn.ThreeDSecure.pareq_message");
$acs_url = $doc-&gt;get("Response.CardTxn.ThreeDSecure.acs_url");
// $acs_url = "http://staging.datacash.com/ops/cgi/args.php";

// error_log ("PAREQ: " . $pareq);
// error_log ("ACS URL: " . $acs_url);
$term_url = "https://staging.datacash.com/ops/tester/next.php";
$md = $doc-&gt;get("Response.datacash_reference") . ":" . $data_set{'vtid'} . ":" .     $data_set{'password'} . ":" . $data_set{'tran_type'} . ":" . $data_set{'url'}

?&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Redirect Test Page&lt;/title&gt;
&lt;/head&gt;
&lt;body OnLoad="OnLoadEvent();" &gt;

&lt;form name="downloadForm" action="&lt;?php echo $acs_url ?&gt;" method="POST"&gt;
    &lt;input type="hidden" name="PaReq" value="&lt;?php echo $pareq ?&gt;"&gt;
    &lt;input type="hidden" name="TermUrl" value="&lt;?php echo $term_url ?&gt;"&gt;
    &lt;input type="hidden" name="MD" value="&lt;?php echo $md ?&gt;"&gt;
&lt;noscript&gt;
    &lt;center&gt;
     &lt;h1&gt;Processing your 3-D Secure Transaction&lt;/h1&gt;
     &lt;h2&gt;JavaScript is currently disabled or is not supported by your browser.    &lt;/h2&gt;&lt;br&gt;
 &lt;h3&gt;Please click on the Submit button to continue the processing of your 3-D secure transaction.&lt;/h3&gt;
 &lt;input type="submit" value="Submit"&gt;
&lt;/center&gt;
&lt;/noscript&gt;
&lt;/form&gt;
&lt;script language="Javascript" &gt;
&lt;!--    
function OnLoadEvent(){
    document.downloadForm.target = "joe";
    document.downloadForm.submit();
}
//--&gt;
&lt;/script&gt;
</code></pre>

<p><hr></p>




<p><hr></p>

<p>
</p>

<p>
