方法一:
Web Service内容没有变,只是换了各地方。比如从localhost:8080/a.asmx换到了localhost:8090/a.asmx。如此一来你不必重新修改Web Reference只需要在使用WebMethod时

C#动态调用webserviceWebS.A a = new WebS.A();
C#动态调用webservicea.Url
="http://localhost:8090/a.asmx"
C#动态调用webservicea.remoteDosth();



可以把Url字符串存到config里面,用的时候去取。

方法二:

C#动态调用webserviceprivate void Page_Load(object sender, System.EventArgs e)

相关文章: