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.

Edit
Report