all groups > dotnet web services > november 2005 >
You're in the

dotnet web services

group:

Sorry, but I have a dumb question about c# web service



Sorry, but I have a dumb question about c# web service Chris
11/30/2005 12:20:08 PM
dotnet web services: 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
Re: Sorry, but I have a dumb question about c# web service Peter Kelcey
11/30/2005 1:44:32 PM
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
AddThis Social Bookmark Button