Skip to content

Commit

Permalink
add data-ajax attributes in AjaxOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mdcooper committed Oct 14, 2017
1 parent ff81cf0 commit d3438df
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/X.PagedList.Mvc.Core/Fake/AjaxOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ public IEnumerable<HtmlAttribute> ToUnobtrusiveHtmlAttributes()
{
var result = new List<HtmlAttribute>();

result.Add(new HtmlAttribute() { Key = "data-ajax-method", Value = this.HttpMethod });
result.Add(new HtmlAttribute() { Key = "data-ajax-mode", Value = this.InsertionMode });
result.Add(new HtmlAttribute() { Key = "data-ajax-update", Value = "#" + this.UpdateTargetId });
result.Add(new HtmlAttribute() { Key = "data-ajax", Value = "true" });

return result;
}

Expand Down

0 comments on commit d3438df

Please sign in to comment.