第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Ajax-enabled WCF Service和普通的WCF Service有什么區(qū)別?

Ajax-enabled WCF Service和普通的WCF Service有什么區(qū)別?

慕容708150 2018-12-06 13:23:55
如題: 我試圖在一個web的客戶端,利用Script Manager控件去加載一個普通的WCF Service,代碼如下: html 代碼 <html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title></title> <script type="text/javascript"> function OnTest() { var ajaxClient = new AjaxTest1.IHelloWorldService(); ajaxClient.DoWork(OnComplete, OnError); } function OnComplete(result) { document.getElementById("txt").value = result.toString(); } function OnError(result) { alert(result.toString()); } </script></head><body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> <Services> <asp:ServiceReference Path="http://localhost/WCFTest/HelloWorldSVC.svc" /> </Services> </asp:ScriptManager> <input id="txt" type="text" /> <input type="button" onclick="OnTest()" value="Button" /> </div> </form></body></html> ?WCF 代碼 [ServiceContract(Namespace = "AjaxTest1")] public interface IHelloWorldService { [OperationContract] string DoWork(); } [ServiceBehavior(TransactionIsolationLevel = IsolationLevel.Serializable)] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] public class HelloWorldService : IHelloWorldService { public string DoWork() { return "Hello World!"; } } 但是總是提示如下錯誤: Error: 'AjaxTest1' is undefined 哪個大蝦幫幫忙????小弟在此拜謝~~~
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 644 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號