I have a simple form question. I order to access a payment gateway I have a
asp.net page which has to have a form that use POST for method and _blank for
target. Before the information of the form can be send of, a checksum has to
be calculated. I want to calculate the checksum server side for security
reasons. The way I do it the checksum is not calculated before the form I
posted. The following is simplified content of the aspx .
<html>
<header>
<%@ Import Namespace=”System.Security.Cryptography “ %>
<script language=”C#” runat=”server”>
void Page_Load(Object sender, EventArgs e) {
PageDataBind();
}
string makeMD5( string s) {
return MD5(s); // The code here is VERY simplified
}
</script>
</header>
<body>
<form id=https://secure.paymentgateway.com/window.php method=”post”
target=”_blank”>
<input type=”hidden” name=”checksumMD5” value=<%# makeMD5( makeMD5(
amount.Value.ToString() ); %> />
<input type=”text” id=”amount” runat=”server” />
<input type=”submit” value=”submit>
</form>
</body>
<html>
I have also tried to let form=”server” and that way calculate in a cs file
server side. I just could’t if any function I C# waould let me form posting
to the payment gateway page.
Any suggestions?
Thanks in advance for any help,