minglelinch
asked on
add a function to web service
I have a web service .asmx file in my project. Now I need to another function. May I just add the one more function in the web service CodeBehind cs file? Can I just add it by
[WebMethod]
public int SaveBinraryData(binrary imagedata)
{
... ...
... ...
}
[WebMethod]
public int SaveBinraryData(binrary imagedata)
{
... ...
... ...
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In Visual Studio, you just need to right-click on the "Web Reference" in the solution explorer and choose "Update Web Reference". That will the trigger Visual Studio into regenerating the proxy class from the WSDL of the service.
ASKER
I got it. Thanks a lot !
ASKER
One further question please. Some functions in asmx ahead with [WebMethod], while some ahead with [WebMethod(EnableSession=t rue)], and some with nothing. Why? EnableSession=true is it used when making DB updates? Thanks.
No, it means that that particular method is able to store state information that can be used on subsequent requests from the same caller.
ASKER
Great answer.
ASKER