How to debug the running status of ASP. NET Server controls

Source: Internet
Author: User

We put the prepared ASP. after the Net Server Control is dragged to the web page, it will find that the actual running effect can be displayed in the design status, indicating that the system will automatically call some functions in the design status, including createchildcontrols.

But if there is a problem at this time, how should we debug it? Press F5 directly, and the system will prompt "the project with Class Library output type cannot be started directly". This requires some tips.

1. Open the solution where the control library is located, because we will open a solution later, which is called a solution.
2. Set the control library in Solution A as the startup project and set the breakpoint where the status needs to be debugged. In this example, we set a breakpoint in the createchildcontrols function.
3. Open the properties page of the control library in Solution A. On the debug sub-page, modify the startup operation. The default setting is to start the project.ProgramSelect devenv.exe as the external program. This program is pulled by the main program of vs2005. It is usually "C: \ Program Files \ Microsoft Visual Studio 8 \ common7 \ ide \ devenv.exe" in a directory similar to the following ".
4. Press F5 to start debugging, and a new vs2005 environment will be automatically opened. The solution we opened in the new environment is called B.
5. Find the page on which the control is placed in solution B and switch from the source view to the design view. If no, the breakpoint of solution a takes effect.
6. ASP. NET custom server controls can be debugged in a similar way when they are designed. The trick is to open two development environments and use one to debug the other.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.