2011-03-08 66 views

回答

5

最簡單的方法可能是把你想要的功能在Web服務,然後使用scriptservice屬性做出的可用。

與頁面方法非常相似。

相當廣泛的例子here

 <asp:ScriptManager> 
      <Services> 
       <asp:ServiceReference Path="~/MyWs.asmx" /> 
      </Services> 
     </asp:ScriptManager> 

然後你可以在JS中調用你的webmethods:MyNamespace.MyWs.MyMethod();

相關問題