Dumb question about c# web services Posted on: 11/30/2005 12:14:16
Ok guys, here is what I am trying to do or what I need to know.
I am creating a webservice called db_update. This webservice will have a
couple of methods that allow it to make updates to a db.
Now, I am having an issue declaring a web method that I can pass data into.
What is the syntax to declare a web method called insert that I can pass 3
strings into when its called ??
Thanks,
Chris
Peter Kelcey - 30 Nov 2005 21:44 GMT
Chris
Its the same syntax as a regular method in a C# class. You just tag
your method using the webmethod attribute.
[WebMethod]
public string insert(string param1, string param2, string param3)
{
//do your db work here.
return "string";
}
Peter Kelcey