0
Answer

WebMethod

Ask a question
Roman

Roman

14y
1.9k
1

I am wokring with a web service and I would like to list all of the web methods of that service on my page. I'm being told that somewhere there is a WebMethod property that I can use to distinguish between web metjods and other methods. This is the code I have so far...
dev_something.
Service APIService = new WebApplication1.dev_something.Service();
Type
api = APIService.GetType();
MethodInfo[] methods = api.GetMethods();
foreach (MethodInfo mi in methods)
{
if (itIsAWebMethod)
{
Response.Write(methodName +
"<br />");
}
}