Simple question:
Now I have that form in my view:
<form action="https://www.xyz.com/xyz/ISO/NewPayment"
method="post" name="payform">
<input type="hidden" name="session_id" value="@Model.OrderId">
<input type="submit" value="Pay">
</form>
It send POST data and redirect user to https://www.xyz.com/xyz/ISO/NewPayment
.
So simple, but I want to check on server side correctness of that data, before user will be redirected to a external URL.
How can I do this in asp.net MVC? How can I send POST data from server side, and then redirect user?
Regards
Use the WebClient
or HttpWebRequest
on the server side to POST data. This works in any .net code, not just mvc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With