我有一個(gè)自定義用戶控件,用作可重復(fù)使用的控件,可ASP DropDownList從RESTful端點(diǎn)異步檢索數(shù)據(jù)<myControls:AjaxDropDown ID="ddlDropdown" runat="server" ServicePath="/MyWebService2.asmx/GetLetterTypes"/>在用戶控件中,我正在通過(guò)成功更新下拉內(nèi)容 $.ajax$.ajax({ type: "GET", dataType: "json", url: $('#<%=textBoxUrlPath.ClientID %>').val(), contentType: "application/json; charset=utf-8", async: true, success: function(res) { onGetLetterTypesSuccess(res); }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert(errorThrown); }});如何將檢索到的數(shù)據(jù)$.ajax與用戶控件的代碼同步?我使用$.ajax而不是通過(guò)UpdatePanel控件進(jìn)行部分更新的原因是 UpdatePanel 無(wú)法在單個(gè)頁(yè)面上一次進(jìn)行多個(gè)異步調(diào)用。
- 2 回答
- 0 關(guān)注
- 183 瀏覽
添加回答
舉報(bào)
0/150
提交
取消