如何将数据从 Html.EditorFor 传递到 myController 中的 myAction?
这是我的编辑器:
<div class="editor-label">
@Html.LabelFor(model => model.Quote_Currency)
</div>
<div class="editor-field">
@Html.EditorFor(model => model.Quote_Currency, new { })
@Html.ValidationMessageFor(model => model.Quote_Currency)
</div>
这是我的控制器动作:
public ActionResult SaveQuote(FxQuote quote, string Quote_Currency)
{
objQuote.Quote_Currency = Quote_Currency;
dcfx.FxQuotes.InsertOnSubmit(quote);
dcfx.SubmitChanges();
return View();
在这里,我试图有一个与我的编辑器同名的参数,但这不起作用。请帮忙。