I know this is a pretty old post, but I was just looking for a similar solution. Based on Slicksim's answer above and a comment from Adam Tulper, I applied the solution below using the data attribute to use a repeating javascript function. So I thought I would send to help others.
@Ajax.ActionLink("Click Me", "ActionName", null, new AjaxOptions { HttpMethod = "GET", InsertionMode = InsertionMode.Replace, UpdateTargetId = "TargetID", OnBegin = "updateHref" }, new { data_dependentid = "DependentFieldName" }) <script> function updateHref(xhr, request) { var requester = $(this); var dependentid = $('#' + requester.attr('data-dependentid')).val(); var requestParams = request.url.split('?'); request.url = requestParams[0] + '/' + dependentid + '?' + requestParams[1]; } </script>
source share