I have a page in VB ASP.NET with the following code (this was generated by VS):
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Payment2.aspx.vb" Inherits="Payment2" %>
<!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 runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
With code
Partial Class Payment2
Inherits System.Web.UI.Page
Sub Page_Load(ByVal S As Object, ByVal E As EventArgs)
End Sub
End Class
And I want to be able to inject the following String into the page and display.
<form name="downloadform3D" action="https://something.asp" method="post">
<NOSCRIPT>
JavaScript is currently disabled or is not supported by your browser.<br>
Please click on the "Continue" button to continue<br>
<input class="ncol" type="submit" value="Continue" id="submit1" name="submit1" />
</NOSCRIPT>
<input type="hidden" name="CSRFKEY" value="abc" />
<input type="hidden" name="CSRFTS" value="abc" />
<input type="hidden" name="CSRFSP" value="/ncol/test/something.asp" />
<input type="hidden" name="PaReq" value="<?xml version="1.0"?><ThreeDSecure><Message id="123"><PAReq><version>1.02</version><Merchant><merID>abc</merID><name>abc</name><url>http://www.abc.com</url></Merchant><Purchase><xid>123</xid><amount>1</amount><purchAmount>1</purchAmount><currency>GBP</currency></Purchase><CH><acctID>12345</acctID><expiry>1234</expiry><selBrand></selBrand></CH></PAReq></Message></ThreeDSecure>
" />
<input type="hidden" name="TermUrl" value="https://something.asp" />
<input type="hidden" name="MD" value="12334" />
</form>
<form method="post" action="https://somethig.asp" name="uploadForm3D">
<input type="hidden" name="CSRFKEY" value="1234A" />
<input type="hidden" name="CSRFTS" value="1234" />
<input type="hidden" name="CSRFSP" value="/something.asp" />
<input type="hidden" name="branding" value="abc" />
</form>
<SCRIPT LANGUAGE="Javascript" >
<!--
var popupWin;
var submitpopupWin = 0;
function LoadPopup() {
if (self.name == null) {
self.name = "ogoneMain";
}
popupWin = window.open('about:blank', 'popupWin', 'height=400, width=390, status=yes, dependent=no, scrollbars=yes, resizable=no');
if (popupWin != null) {
if (!popupWin || popupWin.closed) {
return 1;
} else {
if (!popupWin.opener || popupWin.opener == null) {
popupWin.opener = self;
}
self.document.forms.downloadform3D.target = 'popupWin';
if (submitpopupWin == 1) {
self.document.forms.downloadform3D.submit();
}
popupWin.focus();
return 0;
}
} else {
return 1;
}
}
self.document.forms.downloadform3D.submit();
//-->
</SCRIPT>
I've had a look on google but nothing has helped (I may be entering the wrong search terms as I'm new to web programming). Any help would be really appreciated as I'm not an ASP guy and I've been pulling out what little hair I have left now for 3 days :(
Thanks in advance.