Constructor of WebService

xiaoxiao2021-03-06  72

It seems that the constructor in which no parametry is necessary. 1. public class Tool: System.Web.Services.WebService {public Tool () {InitializeComponent ();} public Tool (string strUrl) {InitializeComponent ();} [WebMethod] public int Insert (string strKey, string strComment) {. . . }

2. The Web References reference.cspublic class Tool: System.Web.Services.Protocols.SoapHttpClientProtocol {/// public Tool () {this.Url = "http: //localhost/NSPTool_WS/Tool.asmx";}

Public Tool (String S) {if (s == ") this.url =" http://localhost/nsptool_ws/tool.asmx "; else this.ur = @" http: // " s @" /NSPTOOL_WS/Tool.asmx ";]} ...

转载请注明原文地址:https://www.9cbs.com/read-109632.html

New Post(0)