3

在 A.ascx 中,我有一个 DropDownList 和一个 DIV。DropDownList 是动态填充的。

当用户更改 DropDownList 中的选定索引时,如何将 B.ascx 加载到 DIV 中。这应该通过使用 jQuery 和 Ajax 在客户端完成,无需回发。

4

1 回答 1

-1
  function selectedindexchange() {
  $.ajax({
    type: "POST",
    url: "CONTROLNAME.ascx",
    data: "{}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function(msg) {
      $('#ContentDIV').html(msg.d);
    }
  });
});
于 2008-10-24T08:56:30.547 回答