F
Frank
Hi,
Newbie wondering if it is possible to call an ASP.NET 2.0 WebService from
javascript that isn't served up on the same server?
For example, I would like to call the WebService using an XmlHttpRequest
object, but it appears that I can't just run the webservice using because
the calling javascript doesn't know about the client proxy js right?
So how do you do this if you want to call the webservice from a javascript
client?
In my webservice, I have used:
At the top of the file:
[System.Web.Script.Services.ScriptService]
And then right where I define my method:
[WebMethod]
[System.Web.Script.Services.ScriptMethod]
public string MyWebMethod() {
return "hello world";
}
Or should I be using IHttpRequest Module to handle this situation?
Thanks for any tips,
Frank
Newbie wondering if it is possible to call an ASP.NET 2.0 WebService from
javascript that isn't served up on the same server?
For example, I would like to call the WebService using an XmlHttpRequest
object, but it appears that I can't just run the webservice using because
the calling javascript doesn't know about the client proxy js right?
So how do you do this if you want to call the webservice from a javascript
client?
In my webservice, I have used:
At the top of the file:
[System.Web.Script.Services.ScriptService]
And then right where I define my method:
[WebMethod]
[System.Web.Script.Services.ScriptMethod]
public string MyWebMethod() {
return "hello world";
}
Or should I be using IHttpRequest Module to handle this situation?
Thanks for any tips,
Frank