I have the following code inside my razor view:-
@Html.PagedListPager(Model , page => Url.Action("Index","Server", new
{
searchTerm = ViewBag.searchTerm,
page,
sort = ViewBag.CurrentSortOrder,
pagesize = $("#pagesize").val()
}),
PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(PagedListRenderOptions.ClassicPlusFirstAndLast,
new AjaxOptions
{
UpdateTargetId = "ServerTable" ,
LoadingElementId="progress2"
}))
But i am unable to get the value of field using the following $("#pagesize").val()
, so can anyone adivce if i can use a javaScript like syntax inside an Html helper ?
Thanks