表单字符串在MVC中发布重定向 [英] Form string Post redirection in MVC
本文介绍了表单字符串在MVC中发布重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I was trying to integrate Payumoney Payment gateway in one of a E Commerce site developed in MVC4. To redirect to the gateway for payment i have to submit :
<pre lang="text"><pre lang="HTML"><form id="PostForm" name="PostForm" action="https://test.payu.in/_payment" method="POST"><input type="hidden" name="lastname" value=""><input type="hidden" name="address2" value=""><input type="hidden" name="udf5" value=""><input type="hidden" name="curl" value=""><input type="hidden" language='javascript'>var vPostForm = document.PostForm;vPostForm.submit();</script>
在ASP.Net中,这是代码
Page.Controls.Add(new LiteralControl(strForm));
如何在MVC中实现这一目标?
谢谢,Prasant
In ASP.Net, this is the code
Page.Controls.Add(new LiteralControl(strForm));
How to achieve this in MVC?
Thanks, Prasant
推荐答案
我试图将Payumoney支付网关集成到MVC开发的电子商务网站之一。要重定向到网关付款,我必须提交:
并在提交操作中我有这个代码。在asp.net c#其工作正常但在mvc我是什么必须为下面的代码,我在使用mvc时收到错误
Page.Controls.Add(new LiteralControl(strForm));
如何在mvc中使用此代码
I was trying to integrate Payumoney Payment gateway in one of a E Commerce site developed in MVC. To redirect to the gateway for payment I have to submit :
and in submit action this code i have.In asp.net c# its working fine but in mvc what i have to put for below code,i am getting error here while using mvc
Page.Controls.Add(new LiteralControl(strForm));
how to use this code in mvc
这篇关于表单字符串在MVC中发布重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文