Modify Request to a POST
I have an MVC 2 app and is getting errors when I try to redirect to the following method;
[ValidateAntiForgeryToken]
[Transaction]
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(Payment payment, PaymentApplication paymentApplication, string exchangeId, bool manual, int firs开发者_如何学编程tPaymentId, int? exchangeEventId, bool addOnly)
{
because it has POST property. Is there anyway I can modify the request header to 'simulate' a POST and go to the correct action??
No, you cannot redirect to actions that require POST verb. Redirects are performed by the client browser using GET verb after the server sent a 301 status code to the new location.
精彩评论