









比如你已经用教科书式的方法添加了一个Web Referece,然后现在这个Web Service内容没有变,只是换了各地方。比如从localhost:8080/a.asmx换到了localhost:8090/a.asmx。如此一来你不必重新修改Web Reference只需要在使用WebMethod时
WebS.A a = new WebS.A();
a.Url="http://localhost:8090/a.asmx"
a.remoteDosth();
就可以了!
可以把Url字符串存到config里面,用的时候去取。
简单罢?
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。