In Web.Config file you need to add the alternate Webservice URL in appSettings
<appSettings>
<add key="AlternateWebServiceURL" value="http://alternatewebservices.com/webservice.asmx"/>
appSettings>
C# Code to dynamically change the WebService
MyWebServiceClass myWebServiceInstance = new MyWebServiceClass ();
myWebServiceInstance.Url = System.Configuration.ConfigurationManager.AppSettings ["AlternateWebServiceURL"];
No comments:
Post a Comment