F5 (debugging) and server controls, f5 debugging server controls

Source: Internet
Author: User

F5 (debugging) and server controls, f5 debugging server controls

I. debugging


When debugging today, I found that the website I entered is http: // ×××. com: 7813/webaspx/System/Login. aspx (because the code is in the company, I don't have it. After waiting for half a day, the page cannot be loaded ). I have encountered a problem similar to this kind of problem since I just entered a new company (the website is deployed on the local IIS and debugging is rarely used. JS Errors often occur when I press F5 ), I thought it was a small problem, so I didn't pay too much attention to it (it laid a hidden danger for the future ). Later, due to the tight schedule of project requirements, the project was in a hurry. The problem arises. The operation is successful due to the failure to print the error, but the database does not find the corresponding data ...... later, the problem was solved by the guidance of a great God (you must debug it first, otherwise it would be difficult to find the problem... Here is the solution to the problem.

1. Right-click "website" and select "properties", as shown in figure


2. Select "Web", for example:

3. select the second or third setting method based on your needs (because I have deployed a website on the local IIS, I can select the second and third methods, and I can select the third method directly, enter the website address)


IIS configuration method: Modify the hosts file (in the C: \ Windows \ System32 \ drivers \ etc folder, when the website is deployed, configure the host (set the URL), for example (right-click the website, select Edit binding... ")

This is the end. Open VS and press F5 to debug it.

------------------------------------------------------------------------------- Perfect split line worker 2. Server Control

Open VS and find a file named ×××. aspx. designer. cs automatically generated by the system. What is the function of the file ???

If you want to know what it is, delete it and try it. Then you will find it on the page. aspx. cs cannot use server controls (So ×××. aspx. designer. the role of the cs file is known, it is to register the server control), what if I still do not want this file ??

A: Add protected global: System. Web. UI. HtmlControls. HtmlForm form1 on the XXX. aspx. cs page. // The form1 control is used as an example.


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.