我有一个名为 AddNews.aspx 的页面,在代码隐藏中有一个名为 AddNews(Parameters)..
AddNews.aspx 页面是从母版页继承的。所以我使用了 contentplaceholder。
我有一个按钮..它的 id 是 btnSave。
这是jquery代码:
$(function() {
$("[id$='_btnSave']").click(function() {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
data: $.toJSON(veriler),
url: "AddNews.aspx/AddNews",
dataType: "json",
success: function(result) {
$("#result").html('News added');
},
error: function() {
alert('Problem');
}
});
});
});
</script>
按钮单击不触发.. 我该怎么办?谢谢。