i am new to ajax and i can't find a way to get passed my problem.
i have a view, on the left side there is a menu with ajax action links, which are updating the div on the right side with different partial views.
this views on the right side have submit buttons.
now my question, i don't wan't this button, each partial view should update or trigger the submit automatically, once the next menu click gets fired.
before i changed the menu to ajax.actionlinks i had done this by hooking the onbeforeunload event. but this event doesn't get fired with ajax updatetargetid.
here some code snippets:
index.cshtml
<div class="col-lg-3">
@Html.Partial("_Navigation")
</div>
<div id="LoadPageContainer" class="col-lg-9"></div>
_navigation.cshtml
<li>
@Ajax.ActionLink("one", "_one", new AjaxOptions() { UpdateTargetId = "LoadPageContainer", InsertionMode = InsertionMode.Replace })
</li>
<li>
@Ajax.ActionLink("two", "_two", new AjaxOptions() { UpdateTargetId = "LoadPageContainer", InsertionMode = InsertionMode.Replace })
</li>
Edit: Adding the OnBegin AjaxOptions did the job for me.