I think you need to improve the description of the problem. You cant add a
brand new reference to a web service at runtime as your code wont use it at
all and it would therefore be useless. You can however specify for the URL
for a reference to be held in the config file so it can be changed if thats
what your after.
I found out some info. I think all I need to do is to change the url in the
web services proxy. Does anyone have any code that I could see how to do this
What you are describing is *NOT* "adding a webreference programatically". You
are describing setting the Url property of a pre-existing webService proxy
client class at runtime. You can do this by simply pulling out your url from
an appSettings element in the web.config, or from a database, and setting the
Url property just before making the proxy method call.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.