Share via


Web Control Library (Managed Code) 

The Web Control Library project template creates a DLL. Because the class library is a DLL, you cannot run it directly. You must create an ASP.NET page that embeds the control. For more information, see Web Control Library Template.

To debug a Web Control Library (Method 1)

  1. Open an existing Web Control Library project, or create a new one.

  2. Create an ASP.NET page that embeds the control.

    For more information, see Building ASP.NET Applications.

  3. In the Web site that is hosting the ASP.NET test harness, create a subdirectory called /Code.

  4. Copy the source code for the control into the /Code subdirectory.

  5. Open the source code in the /Code subdirectory and set breakpoints.

  6. Open a browser window with a URL that points to the test harness. A breakpoint in the control will be hit, and you can start debugging.

To debug a Web Control Library (Method 2)

  1. Create the host application project and the web control project in the same solution.

  2. In Solution Explorer, right-click on the host application and choose Add Reference from the shortcut menu.

  3. Add a reference to the web control project.

See Also

Tasks

Debugging Preparation: ASP.NET Web Applications