如何将DropDownList中的选定值作为输入参数传递给@ Ajax.ActionLink

时间:2017-07-09 09:00:42

标签: jquery html ajax

我想将一个参数从dropdownlist传递给actionlink。

  • DropDownList: @ Html.DropDownList(“Zpy_moisId”,null,“”)

  • actionlink: @ Ajax.ActionLink(“PRI”,“_ PRI”,         新的AjaxOptions         {             HttpMethod =“GET”,             UpdateTargetId =“PRI”,             InsertionMode = InsertionMode.Replace         })

非常感谢

1 个答案:

答案 0 :(得分:1)

如果有这样的选择:

 $("select").change(function () {
        var data = $(this).find(":selected").text();
        $.ajax({
            url : "url/address" ,
            type: "GET",
            data : data,
            success : function () {
                alert("success done");
            }
        })
    });
使用jQuery $ .ajax:

选择后,

可以传递选定的值

        mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
        @Override
        public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
            super.onScrolled(recyclerView, dx, dy);
           if (!recyclerView.canScrollVertically(1)){
             //Load more data here. It will only trigger when you reach the end of your list and cannot scroll further
           }
        }
    });
相关问题