在A.ascx中,我有一个DropDownList和一个DIV。 DropDownList是动态填充的。
当用户更改DropDownList中的选定索引时,如何将B.ascx加载到DIV中。这应该通过使用jQuery和Ajax在客户端进行,而无需回发。
在A.ascx中,我有一个DropDownList和一个DIV。 DropDownList是动态填充的。当用户更改DropDownList中的选定索引时,如何将B.ascx加载到DIV中。这应该...
This article显示您。我花了很长时间才找到一个例子
function selectedindexchange() {
$.ajax({
type: "POST",
url: "CONTROLNAME.ascx",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
$('#ContentDIV').html(msg.d);
}
});
});