laredo512 Posted February 18, 2006 Posted February 18, 2006 Hey people! I have to build a payment page for a given site. The API from the payment processor permits us to send hidden values as a POST to a designated HTTPS address. The goal is to collect 3 text fields from our form and then pass those without the user seeing the values while redirecting the user to the actual secure form on the remote site. In other words, I don't want to use response.redirect since the user will see the values being passed. Is there another way ? Webclient ? Thanks Quote Laredo512 * using VS.NET Pro 2003 *
cyclonebri Posted February 19, 2006 Posted February 19, 2006 Hey people! I have to build a payment page for a given site. The API from the payment processor permits us to send hidden values as a POST to a designated HTTPS address. The goal is to collect 3 text fields from our form and then pass those without the user seeing the values while redirecting the user to the actual secure form on the remote site. In other words, I don't want to use response.redirect since the user will see the values being passed. Is there another way ? Webclient ? Thanks You can use server.transfer("URL?asdf=1&sadf=2&dasf=3") to move from one page to another without changing the visible text in the address bar. I am not sure this will work for you, however, if you are going to an app that is outside of your control (say mypage.aspx -> theirpage.aspx). You can also use hidden fields and request the hidden field on the 2nd page if you have control on the 2nd page, or session variables (again if you have control). If you can pass hidden variables outside of the query string, hidden is the best solution. If the variables must be in the query string, I would try the server.transfer. If what you are trying to do is get the three variables, post them to some url (or database) and transfer the client to another, then use server.transfer to first move to a second page in your app, execute the post, and then do the redirect. Hope that helps! Brian Quote
laredo512 Posted February 19, 2006 Author Posted February 19, 2006 I can try that and I'll see if this works... Perhaps if I explained it this way it would make more sense: Is there an equivalent to doing this programmatically: <form name="form1" id="form1" method="post" action="https://remotesite.com/xample.php"> <input type="hidden" name="transaction" value="whatever" /> I want to be able to set those in my code dynamically before the user goes to the foreign site. Thanks Quote Laredo512 * using VS.NET Pro 2003 *
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.