2

I am using Ajax Begin for in my view to make an asynchronous call to filter some results on my view. I have it working fine but the url does not get updated with the search filter like it did when I was doing a full page refresh.

@using (Ajax.BeginForm(new AjaxOptions
{
    HttpMethod = "get",
    InsertionMode = InsertionMode.Replace,
    UpdateTargetId = "LegislatorList",
    OnSuccess = "changeUrl(data)"
}))
{
    <input type="submit" name="chamber" value="House" />
    <input type="submit" name="chamber" value="Senate" />
    <input type="submit" name="chamber" value="Other" />
    <input type="submit" name="chamber" value="All" />
}

I tried using the onsuccess property to create the new url but it was not working properly.

Juan
  • 147
  • 1
  • 1
  • 10

0 Answers0