KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to generate such HTML <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> so it can be processed by this Action: public ActionResult Process(Foo foo, Bar bar) { ... } Given the Action code public ActionResult Edit() { ViewData["foo"] = new Foo { A = "aaa" }; ViewData["bar"] = new Bar { B = "bbb" }; return View(); } what should I write in Edit.aspx view? I don't want to write names 'foo.a' and 'bar.b' manually.
Tags (comma-separated)
Save Edits
Cancel