Share via


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

In Application Designer and System Designer, you can delete operations and parameters from a Web service provider endpoint on an ASP.NET application. You can perform this task by using the Web Service Details window.

After you implement the application, you can delete operations and parameters from the Web service class file or the class diagram (.cd) file by using Class Designer, if you chose to add a class diagram for the Web service to the application project.

Note

Visual Studio synchronizes changes that you make to operations and parameters through the designers or in code. Therefore, deleting operations and parameters through the Web Service Details window removes them from the corresponding Web service class files and any class diagrams in the solution and vice versa.

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

Concepts

Overview of ASP.NET Applications on Application Diagrams

Reference

Keyboard Shortcuts for the Web Service Details Window

Other Resources

Defining Operations for ASP.NET Web Services