What attribute must mark the methods exposed by a Web Service?
-
Web Service Method ()
-
Web Method ()
-
Web Services ()
-
Services Method ()
B
Correct answer
Explanation
In .NET ASMX web services, methods must be marked with the [WebMethod] attribute to be exposed as callable web service operations. This attribute enables the method to be invoked via SOAP/HTTP requests. Without it, the method remains internal to the class.