Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 30 Nov 2005 20:20 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.