Post to another page
-
Hi, This worked fine in our ASP web site but bit of an issue with ASP.NET We have integrated a third party payment s/w with our website which requires us to post some variables to their website, like the amount, description, billing name etc. In ASP.Net, the aspx page posts to itself which is not fitting with third party payment requirements. I have tried removing the "runat=server" in form but still doesn't appear to be working. Any ideas would be appreciated. Thanks.
-
Hi, This worked fine in our ASP web site but bit of an issue with ASP.NET We have integrated a third party payment s/w with our website which requires us to post some variables to their website, like the amount, description, billing name etc. In ASP.Net, the aspx page posts to itself which is not fitting with third party payment requirements. I have tried removing the "runat=server" in form but still doesn't appear to be working. Any ideas would be appreciated. Thanks.
May be you thought already, but could you pass those parameters through GET method? daniero
-
May be you thought already, but could you pass those parameters through GET method? daniero
-
Hi, This worked fine in our ASP web site but bit of an issue with ASP.NET We have integrated a third party payment s/w with our website which requires us to post some variables to their website, like the amount, description, billing name etc. In ASP.Net, the aspx page posts to itself which is not fitting with third party payment requirements. I have tried removing the "runat=server" in form but still doesn't appear to be working. Any ideas would be appreciated. Thanks.
-
Exactly the same problem that we used to have with aspx ;) Luckily we are the payment gateway... Do you need to post and have the user redirected to the payment gateway pages? or do you only need to post the data?
-
This may sound dumb... but you may want to try using a 'hopping' ASP page, where you receive parameters through GET method as I told you, and then this page automatically posts to that other page. Of course, this should be used if you are only passing non-sensitive data. It may not be the best method but it's an idea. daniero
-
Hi, This worked fine in our ASP web site but bit of an issue with ASP.NET We have integrated a third party payment s/w with our website which requires us to post some variables to their website, like the amount, description, billing name etc. In ASP.Net, the aspx page posts to itself which is not fitting with third party payment requirements. I have tried removing the "runat=server" in form but still doesn't appear to be working. Any ideas would be appreciated. Thanks.
If you remove runat="server" from the form, it will surely work. Then it's all plain html and the server code doesn't care a bit what it looks like as long as it's reasonably valid html. When it's a server form, the rendering will set the action property to post back, but when it's plain html you can set it yourself. Use HtmlControls rather than WebControls in the form. The web controls uses ViewState and stuff that is not available when you don't have a server form. For any fields that you don't need to access from the server code, just use plain html. --- b { font-weight: normal; }
-
Hi, This worked fine in our ASP web site but bit of an issue with ASP.NET We have integrated a third party payment s/w with our website which requires us to post some variables to their website, like the amount, description, billing name etc. In ASP.Net, the aspx page posts to itself which is not fitting with third party payment requirements. I have tried removing the "runat=server" in form but still doesn't appear to be working. Any ideas would be appreciated. Thanks.
-
Hi, This worked fine in our ASP web site but bit of an issue with ASP.NET We have integrated a third party payment s/w with our website which requires us to post some variables to their website, like the amount, description, billing name etc. In ASP.Net, the aspx page posts to itself which is not fitting with third party payment requirements. I have tried removing the "runat=server" in form but still doesn't appear to be working. Any ideas would be appreciated. Thanks.
You can do cross-page posting in ASP.NET 2.0. Take a look at Dino Esposito's MSDN Article[^] on ASP.NET forms - about half-way down he describes cross-page posting nicely.
-
You can do cross-page posting in ASP.NET 2.0. Take a look at Dino Esposito's MSDN Article[^] on ASP.NET forms - about half-way down he describes cross-page posting nicely.
-
Hi, This worked fine in our ASP web site but bit of an issue with ASP.NET We have integrated a third party payment s/w with our website which requires us to post some variables to their website, like the amount, description, billing name etc. In ASP.Net, the aspx page posts to itself which is not fitting with third party payment requirements. I have tried removing the "runat=server" in form but still doesn't appear to be working. Any ideas would be appreciated. Thanks.
Hi, I'm working on something simmular and the code below works, so the payment page is showing and the payment works fine, but it's the rough version. The idea is that i send the requested data over Https and get an xml file back with a key, i need to retrieve this key to go to the payment page. The url that my payment provider has given me is between the dots from Https... until the ? mark , and the command name i have to call is marked with xxxxxx. At the end of the code, were the Response.Redirect is i send the key i retrieve along with other parameters to the payment page. Because the data i have to send is confidential i changed all the names into parameter1 etc, but i hope this code is helpfull to you. If you have questions let me know via Skype. ------------------------------------------------------------------------------ using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml; using System.IO; using System.Net; using System.Text; public partial class pay : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //Todo } protected void ReadXml_Click(object sender, EventArgs e) { //Creating the strings that call the new_payment_cluster: string A01; // These strings will hold the requested value; string A02; // that will be send after the parameters in the string A03; // string below string A04; string A05; string A06; string A07; string A08; string A09; string A10; string A11; string A12; string A13; string A14; string A15; string A16; //Setting the values of the strings A01 to A16 to the filled in //TextBoxes on the webpage that hold the transaction data to be //send to your payment provider. A01 = TextBox1.Text.ToString(); A02 = TextBox2.Text.ToString(); A03 = TextBox3.Text.ToString(); A04 = TextBox4.Text.ToString(); A05 = TextBox5.Text.ToString(); A06 = TextBox6.Text.ToString(); A07 = TextBox7.Text.ToString(); A08 = TextBox8.Text.ToString(); A09 = TextBox9.Text.ToString(); A10 = TextBox10.Text.ToString(); A11 = Text
-
Hi, I'm working on something simmular and the code below works, so the payment page is showing and the payment works fine, but it's the rough version. The idea is that i send the requested data over Https and get an xml file back with a key, i need to retrieve this key to go to the payment page. The url that my payment provider has given me is between the dots from Https... until the ? mark , and the command name i have to call is marked with xxxxxx. At the end of the code, were the Response.Redirect is i send the key i retrieve along with other parameters to the payment page. Because the data i have to send is confidential i changed all the names into parameter1 etc, but i hope this code is helpfull to you. If you have questions let me know via Skype. ------------------------------------------------------------------------------ using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml; using System.IO; using System.Net; using System.Text; public partial class pay : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //Todo } protected void ReadXml_Click(object sender, EventArgs e) { //Creating the strings that call the new_payment_cluster: string A01; // These strings will hold the requested value; string A02; // that will be send after the parameters in the string A03; // string below string A04; string A05; string A06; string A07; string A08; string A09; string A10; string A11; string A12; string A13; string A14; string A15; string A16; //Setting the values of the strings A01 to A16 to the filled in //TextBoxes on the webpage that hold the transaction data to be //send to your payment provider. A01 = TextBox1.Text.ToString(); A02 = TextBox2.Text.ToString(); A03 = TextBox3.Text.ToString(); A04 = TextBox4.Text.ToString(); A05 = TextBox5.Text.ToString(); A06 = TextBox6.Text.ToString(); A07 = TextBox7.Text.ToString(); A08 = TextBox8.Text.ToString(); A09 = TextBox9.Text.ToString(); A10 = TextBox10.Text.ToString(); A11 = Text
Eric, Thanks for your reply. I have to post this information and can't really send it in as a querystring. It is the requirement of the payment gateway that we post the information in form of hidden variables. They have even defined the variable names. I mean like : In this case, the value for amount has to be set dynamically based on what the amount is calculated in previous page. I am passing this amount value from previous page as a session variable. I need to post this information to payment gateway in a form. Thanks. Vani
-
Hi, I'm working on something simmular and the code below works, so the payment page is showing and the payment works fine, but it's the rough version. The idea is that i send the requested data over Https and get an xml file back with a key, i need to retrieve this key to go to the payment page. The url that my payment provider has given me is between the dots from Https... until the ? mark , and the command name i have to call is marked with xxxxxx. At the end of the code, were the Response.Redirect is i send the key i retrieve along with other parameters to the payment page. Because the data i have to send is confidential i changed all the names into parameter1 etc, but i hope this code is helpfull to you. If you have questions let me know via Skype. ------------------------------------------------------------------------------ using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml; using System.IO; using System.Net; using System.Text; public partial class pay : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //Todo } protected void ReadXml_Click(object sender, EventArgs e) { //Creating the strings that call the new_payment_cluster: string A01; // These strings will hold the requested value; string A02; // that will be send after the parameters in the string A03; // string below string A04; string A05; string A06; string A07; string A08; string A09; string A10; string A11; string A12; string A13; string A14; string A15; string A16; //Setting the values of the strings A01 to A16 to the filled in //TextBoxes on the webpage that hold the transaction data to be //send to your payment provider. A01 = TextBox1.Text.ToString(); A02 = TextBox2.Text.ToString(); A03 = TextBox3.Text.ToString(); A04 = TextBox4.Text.ToString(); A05 = TextBox5.Text.ToString(); A06 = TextBox6.Text.ToString(); A07 = TextBox7.Text.ToString(); A08 = TextBox8.Text.ToString(); A09 = TextBox9.Text.ToString(); A10 = TextBox10.Text.ToString(); A11 = Text
Hi, I tried a simple post to another web site - for some reason it doesn't seem to be doing anything. In the vb file: Dim httpmyReq As HttpWebRequest = _ WebRequest.Create("http://www.microsoft.com") httpmyReq.Method = "POST" In aspx page:
On browsing on IE, which does't it redirect to the Microsoft website? Many thanks.