C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Using optional parameters in web service


Posted Date: 29 Aug 2008      Total Responses: 2

Posted By: Kiran       Member Level: Gold     Points: 1



Hi,

I want to write a webmethod using optional parameters. So that, while consuming the serice, upon my requirements i can or can't pass the parameters to the web method of the service.

Anybody provide me solution how to create a webmethod with optional parameters?
Any reference link also will do for me.

Thanks
Kiran





Responses

Author: D.Jeya kumar(JK)    29 Aug 2008Member Level: DiamondRating:     Points: 4

Hi,


Web service webmethods will not support optional parameters. please use overloading concept.

Sample



Public sub Fucntion(byval a as integer)

End sub

Public sub Fucntion(byval a as integer,byval s as string)

End sub

Public sub Fucntion(byval a as integer,byval s as string,byval i as integer)

End sub



Regards
JK



Author: Neha Mathur    01 Sep 2008Member Level: SilverRating:     Points: 1

u have to use function overloading in case of web services.


Post Reply
You must Sign In to post a response.
Next : Webservice and its application
Previous : need forex exchange rates
Return to Discussion Forum
Post New Message
Category: Webservices

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use