Got a situation where I have to post information offsite to a coldfusion server. I had it working on a bare aspx page using response.write statements of all my old form elements and it worked fine. Using repsonse.writes in my template obviously doesn't work since they are posted at the top of the page, so I'm trying to use labels to write in the 3 hidden fields I need populated.
I can get the fields to populate but for some reason, the form no longer posts offsite even though I had it working in another test page ...
I removed the 3 auto-populated fields and the form still won't post when that button is clicked. Just refreshes and probably has something to do with asp.net posting back to itself ... but it worked on my test page ...
What I think would work if I can get the stupid form to post again would be:
On page load, the form elements are filled out with this information from the querystring I send to it:
Now for troubleshooting, I removed the 3 fields to just see if I can get the form to post to the offsite page but it refreshes. I know it's stupid but can someone give me a clue anyway!? )
Thanks,
MZ
This is what the page renders in the source minus a few labels and directions:
I can get the fields to populate but for some reason, the form no longer posts offsite even though I had it working in another test page ...
I removed the 3 auto-populated fields and the form still won't post when that button is clicked. Just refreshes and probably has something to do with asp.net posting back to itself ... but it worked on my test page ...
What I think would work if I can get the stupid form to post again would be:
Code:
<fieldset style="padding: 1em 1em 1em 1em; text-align: center;">
<legend>Payment</legend>
<form action="[URL unfurl="true"]https://www.site.com/payment/redirect/"[/URL] method="post">
<asp:Label ID="Label4" runat="server" Text=""></asp:Label>
<asp:Label ID="Label5" runat="server" Text=""></asp:Label>
<asp:Label ID="Label6" runat="server" Text=""></asp:Label>
<input type="hidden" name="passkey" value="5555" />
<input type="hidden" name="Password" value="password" />
<input type="hidden" name="Confirmation" value="true" />
<input type="hidden" name="Payment" value="ourcom" />
<input type="hidden" name="another" value="another" />
<input type="hidden" name="Redirect" value="[URL unfurl="true"]http://www.ourcompany.com/thanks.aspx"[/URL] />
<br /><br />
<input type="submit" value="Click here to Verify and Proceed!">
</form>
</fieldset>
On page load, the form elements are filled out with this information from the querystring I send to it:
Code:
Dim AccountID As String = Server.UrlDecode(Request.QueryString("AccountID"))
Dim CustNameID As String = Server.UrlDecode(Request.QueryString("NameID"))
Dim AmountID As String = Server.UrlDecode(Request.QueryString("AmountID"))
Dim Payment As String = Server.UrlDecode(Request.QueryString("PaymentID"))
Label4.Text = ("<input type=""hidden"" name=""CustName"" VALUE=""" & CustNameID & """ />")
Label5.Text = ("<input type=""hidden"" name=""AccountNo"" VALUE=""" & AccountID & """ />")
Label6.Text = ("<input type=""hidden"" name=""Amount"" VALUE=""" & Payment & """ />")
Now for troubleshooting, I removed the 3 fields to just see if I can get the form to post to the offsite page but it refreshes. I know it's stupid but can someone give me a clue anyway!? )
Thanks,
MZ
This is what the page renders in the source minus a few labels and directions:
Code:
<fieldset style="padding: 1em 1em 1em 1em; text-align: center;">
<legend>title</legend>
<form action="[URL unfurl="true"]https://www.website.com/payment/redirect/page.cfm"[/URL] method="post">
<span id="ctl00_ContentPlaceHolder1_Label4"><input
type="hidden" name="CustName" VALUE="Account Name" /></span>
<span id="ctl00_ContentPlaceHolder1_Label5"><input
type="hidden" name="AccountNo" VALUE="65656565656565655" /></span>
<span id="ctl00_ContentPlaceHolder1_Label6"><input
type="hidden" name="Amount" VALUE="300" /></span>
<input type="hidden" name="ClientID" value="555" />
<input type="hidden" name="Pass" value="password" />
<input type="hidden" name="Confirmation" value="true" />
<input type="hidden" name="Payment" value="The Com" />
<input type="hidden" name="passid" value="pass" />
<input type="hidden" name="Redirect" value="[URL unfurl="true"]http://www.website.com/thanks.aspx"[/URL] />
<br /><br />
<input type="submit" value="Click here to Verify and Proceed!">
</form>
</fieldset>