1、新建 WebService1.asmx ; 2、在WebService1.cs中加入代码: [WebMethod] public int WebAdd( int x, int y) ... { return