<form action="/some/process" method="post">
<input type="hidden" name="foo.a" value="aaa"/>
<input type="hidden" name="bar.b" value="bbb"/>
<input type="submit" />
</form>
그래서
그것은이 작업을 처리 할 수 있습니다
public ActionResult Process(Foo foo, Bar bar)
{
...
}
작업 코드
public ActionResult Edit()
{
ViewData["foo"] = new Foo { A = "aaa" };
ViewData["bar"] = new Bar { B = "bbb" };
return View();
}
을 감안할 때
Edit.aspx보기에서 무엇을 작성해야합니까? 나는 'foo.a'와 'bar.b'라는 이름을 수동으로 쓰고 싶지 않습니다.