By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,260 Members | 1,677 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,260 IT Pros & Developers. It's quick & easy.

changing a web reference on the fly

P: n/a
If I add a web reference to my code it works fine. I need to know how to
dynamically set the url for the web reference. Sometimes URL's change and
would be nice to let the user enter a new URL in a setup form instead of
having to send out updated code.

Is this possible. If so how?

Thanks.
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Cor
Hi Tommy,

With this information the only thing I can give you is:

Dim url as string = textbox1.text

But I think that was not what you did mean?

Cor
If I add a web reference to my code it works fine. I need to know how to
dynamically set the url for the web reference. Sometimes URL's change and
would be nice to let the user enter a new URL in a setup form instead of
having to send out updated code.

Is this possible. If so how?

Nov 20 '05 #2

P: n/a
set the url property of the web reference...

dim svc as new testWebService.Resource() ' ficticious interface
svc.Url = http://www.someplace.com/yourservice/yourservice.asmx
svc.timeout = 60
etc....

also, i'd think of AllowAutoRedirect if you'd like to have the server
re-route the consumer to another url...bypassing the need, somewhat, for the
user to have to resort to changing their own url. at least as a suppliment
in doing so.

hth,

steve
"Tommy Martin" <tm*****@xspam-tlmartin.com> wrote in message
news:uN**************@TK2MSFTNGP11.phx.gbl...
| If I add a web reference to my code it works fine. I need to know how to
| dynamically set the url for the web reference. Sometimes URL's change and
| would be nice to let the user enter a new URL in a setup form instead of
| having to send out updated code.
|
| Is this possible. If so how?
|
| Thanks.
|
|
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.