0

我已经尝试过这个工作正常但无法从控制器动态传递这些静态参数任何MVC 专家朋友请在我的情况下帮助我,我将非常感谢您的帮助。

查看代码:

<form action="https://secure-test.worldpay.com/wcc/purchase" name="BuyForm" method="POST">
<input type="hidden" name="instId"  value="211616"><!-- The "instId" value "211616" should be replaced with the Merchant's own installation Id -->
<input type="hidden" name="cartId" value="abc123"><!-- This is a unique identifier for merchants use. Example: PRODUCT123 -->
<input type="hidden" name="currency" value="GBP"><!-- Choose appropriate currency that you would like to use -->
<input type="hidden" name="amount"  value="400">
<input type="hidden" name="desc" value="Product-1,Product-2,Product-3,Product-4">
<input type="hidden" name="testMode" value="100">

<input type="submit" value="submit" />
</form>
4

1 回答 1

0

尝试使用基于模型的视图,如下所示

@model Merchant

@using (Html.BeginForm("action","controller",htmlAttr))
{

@Html.HiddenFor(m=>m.InstallationId);
//etc

}
于 2013-10-08T11:29:52.987 回答