AJAX Helpers trong ASP.NET MVC là gì?
AJAX Helpers trong ASP.NET MVC là gì?
AJAX Helpers (Ajax.BeginForm, Ajax.ActionLink) trong ASP.NET MVC 5 sinh markup + data-ajax-* để thực hiện request bất đồng bộ, cập nhật một phần trang bằng jQuery Unobtrusive AJAX.
@using (Ajax.BeginForm("Search", "Products", new AjaxOptions { UpdateTargetId = "result", HttpMethod = "POST", InsertionMode = InsertionMode.Replace, LoadingElementId = "spinner", OnSuccess = "onDone" }))
{
<input type="text" name="q" /><input type="submit" value="Tìm" />
}
Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.