我需要调用当一个项目被挑中的ASP下拉框中选择一个服务器端的功能, 是否有人可以告诉我该怎么做?
I need to invoke a server side function when an item is picked in an ASP drop-down box, Can someone please tell me how to do that?
在ASP.NET中使用下拉选择指数的变化情况。或者对客户端的事件,你可以使用jQuery,然后使用下面的JavaScript函数连接到服务器:
Within ASP.NET use the drop down selected index change event. Alternatively for a client side event you could use JQuery and then use the following JavaScript function to contact the Server:
function CallServer() {
$.ajax({
url: 'webserviceURL',
type: "POST",
datatype: "json",
success: function (result) {
if (result.Success) {
} else {
}
}
});
}
上一篇:TCP:为什么只有第二次调用Socket.Receive(字节[])返回的数据?字节、数据、TCP、Socket
下一篇:使用SqlDataReader对象时,我怎样才能得到存储过程的返回值?存储过程、返回值、对象、SqlDataReader