I am faced with a situation in which I am utilizing Ajax.ActionLink() to invoke and load a child view within a parent view. There is a button on the child view that triggers another child view to be displayed. It is my desire for this subsequent child view to also appear within the parent view.
While I can bring the child view into the calling child view by using Ajax.ActionLink, the use of the button presents additional advantages such as being able to pass data in the beginform and validating fields before submission.
Upon clicking the button, selected information from two dropdown lists and other data in the BeginForm are sent:
@using (Html.BeginForm("Action", "Controller", new { courseID = 1001 }, FormMethod.Post, new { @id = "formName", @name = "formName" }))
However, when the view returns, it opens in a new window rather than displaying within the parent view or the child view that initiated the call.
My inquiry is how can I ensure that the partial view appears within either the child view that called it or within the parent view? In essence, the parent invokes Child A, and then Child A triggers Child B.