Html.EditorFor에서 myController의 myAction으로 데이터를 전달하는 방법은 무엇입니까? 난 내 편집기와 같은 이름의 매개 변수가하려고했지만 그 작동하지 않았다, 여기Html.EditorFor에서 컨트롤러로 데이터 전달
public ActionResult SaveQuote(FxQuote quote, string Quote_Currency)
{
objQuote.Quote_Currency = Quote_Currency;
dcfx.FxQuotes.InsertOnSubmit(quote);
dcfx.SubmitChanges();
return View();
:
<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>
이 내 컨트롤러 액션입니다 :
이
내 편집기입니다 . 도와주세요.
는'
모델은 어떤 유형입니까? – Xharze
편집기는 (Html.BeginForm) 형식으로되어 있습니다. LINQ를 사용하고 있습니다. – Bree