How to: Delete Operations and Parameters from ASP.NET Web Services 

In Application Designer, you can delete operations and parameters from a Web service provider endpoint on an ASP.NET application at any time using the Web Service Details window. After the application is implemented, you can also delete operations and parameters from the Web service class file or the class diagram (.cd) file using Class Designer, if you chose to add a class diagram for the Web service to the application project.

Note

Changes that you make to operations and parameters through the designers or in code are kept synchronized with each other. Therefore, deleting operations and parameters using the Web Service Details window also removes them from the corresponding Web service class files and any class diagrams in the solution and vice versa.

For more information, see Overview of ASP.NET Applications on Application Diagrams.

To delete an operation or parameter in the Web Service Details window

  1. On the diagram, select the Web service provider endpoint with the operation or parameter you want to delete.

  2. On the Diagram menu, choose Define Operations.

    Tip

    You can also right-click the Web service provider endpoint to choose Define Operations.

    The Web Service Details window opens.

  3. In the Web Service Details window, select the operation or parameter row and choose Delete from the Edit menu.

    Tip

    You can also right-click the operation or parameter row and choose Delete. To delete a cell's contents only, click in the cell, then choose Delete from the Edit menu or right-click and choose Delete.

    The operation or parameter that you chose is deleted. If the endpoint is implemented, the corresponding method or parameter is deleted from code.

To delete an operation or parameter from the Web service class file or class diagram

  1. On the diagram, select the Web service provider endpoint, point to Implementation, and choose one of the following:

    • View Code to open the Web service class file.

      Tip

      You can also right-click the endpoint to choose View Code. You can also open the Web service class file from the corresponding project in Solution Explorer.

    • View In Class Diagram - <WebServiceName> to open the class diagram.

      Note

      Class Designer creates a class diagram if one has not been previously saved. Otherwise, it opens the previously saved class diagram.

  2. In the class file or from the class diagram, delete the operation or parameter that you want deleted.

    Tip

    You can also open these files from the corresponding application project in Solution Explorer.

For more information about class diagrams, see Designing and Viewing Classes and Types.

See Also

Reference

Keyboard Shortcuts for the Web Service Details Window

Other Resources

Defining Operations for ASP.NET Web Services