Is it possible to do a cross page POST to an ASP.NET, from a static HTML form?

I am trying to create a static HTML page which has a <form> which posts to a 3rd-party ASP.NET website.

Is this possible when the target website uses ASP.NET webforms?

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

This is absolutely possible. You can issue a POST to any website, anywhere. (Keep this in mind when you’re designing an application that accepts POSTs from a web merchant such as PayPal 😉 make sure you know where the POST is coming from.)

Whether or not the website will accept your request, of course, is up to however the server-side code was programmed. If you’re POSTing to an ASP.NET WebForms app and the app wasn’t designed to accept third-party POSTs, then you’re going to have a hard time making your POST parameters look like they came fro ma WebForms page. For example, the website will be looking for the encrypted viewstate, among other things.

You could use firebug or some other tool to sniff the POST data from the webforms app, and then replicate that data in your static HTML page …. it might work.

Do you have any programming control over the ASP.NET Webforms app at all?

Solution 2

check out this question:

How to POST Data to another web application (cross domain)

Let me know, if you need help with my implementation.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply