سؤال

I have the following issue.

My url structure is like this:

/people/edit/usercode

In my controller i have the following:

    [AcceptVerbs(HttpVerbs.Post)]
    public PartialViewResult LoanRefresh(string id)
    {
        PeopleModel p = new PeopleModel();
        return PartialView("_LoanHistory", p.getPersonLoanHistory(id));

    }

In my view i have:

@Ajax.ActionLink("Refresh", "LoanRefresh", new { id = Model.IdentityCode }, new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "loanHistory", LoadingElementId = "Loading"  }, new { @class = "button" })

and

 <div id="loanHistory">
    @Html.Partial("_LoanHistory", Model.Loans)
 </div>

When run the Ajax.ActionLink it gets the data back ok and it updates the div, but the url of the sort links on the webgrid then change their address to:

/People/LoanRefresh/AFU0006?sort=CreatedOn&sortdir=ASC

i need to stay as:

/People/Edit/AFU0006?sort=CreatedOn&sortdir=ASC

Any help would be greatly appreciated.

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top