In asp.net mvc3, if I have a top view:
@model BuilderVM
@using (Ajax.BeginForm("TaskSelector", ajaxOpts))
{
}
<div id="here"></div>
which gets updated with a partial view in the div id="here"
returned from the action TaskSelector
after a post from the Ajax form (i.e. public action TaskSelector(BuilderVM m){var vm = new SelectorVM();vm.property=m.property;return PartialView(vm);}
. Inside that div, this next partial view is genereated:
@model SelectorVM
@using (Ajax.BeginForm("Choices", ajaxOpts))
{
}
<div id="selected"></div>
From that partial view, the next partial view is then updated inside the div id="selected"
.
@model ChooserVM
@using (Ajax.BeginForm("Ender", ajaxOpts))
{
}
<div id="ended"></div>
How, from the action "Ender"
public ActionResult Ender (ChooserVM vm)
{
//access BuilderVM.SomeProperty
}
can I access BuilderVM?
Short answer: you don't. There is no access unless the data is stored in the session.