How to make HtmlSelect Control with OnChange event to trigger C# code behind function

后端 未结 4 761
走了就别回头了
走了就别回头了 2021-01-14 06:30

How should I make \"Html Select Control\" with OnChange event to trigger C# code behind function
like ASP.NET SelectedIndexChanged of the DropDownList C

4条回答
  •  甜味超标
    2021-01-14 06:48

    Use Ajax call in xx_ServerChange function from JavaScript

    $.ajax({
        type: 'POST',
        url: 'PageName.aspx/functionName()',
        data: '{ }',
        contentType: 'application/json; charset=utf-8',
        dataType: 'json',
        success: function(msg) {
            // Do something interesting here.
        }
    });
    

提交回复
热议问题