First, commissioning
Background:
Debugging today when found that I entered the URL is http://xxx.com:7813/webaspx/System/Login.aspx(because of the code in the company, I did not, waiting for a half-day display can not load the page). As soon as I entered the new company similar to the problem also encountered (site deployment on the native IIS, rarely used debugging, press F5 often appear JS error), thought is small problem there is no too much attention (for later buried the hidden trouble). Later, because the project demand progress is relatively tight, hurry to catch up with progress. Problem came, encountered problems, due to the inability to print errors, the operation executed successfully, but the database did not find the corresponding data, impatient ing ... Later through the Great God guidance (you have to be able to debug, otherwise difficult to find the problem), the problem solved ... Here's how to solve the problem
1. Right-click on "Site" to select "Properties", as
2. Select "Web", such as:
3. Choose a second or a third setting based on your needs (since I have already deployed the site on my local IIS, I chose the second and third, I choose the third type directly, enter the website address)
Attention:
How IIS is configured: Modify the Hosts file (under the C:\Windows\System32\drivers\etc folder, configure the host (set URL) when you deploy the Web site), such as (right-click the Web site, select Edit Bindings ...)
By the end, open vs, press F5 to debug
-------------------------------------------------------------------------------Perfect Split Line------------------------------------- ---------------------------------------------------------two, server controls
Open vs, find the Xxx.aspx page has a Xxx.aspx.designer.cs file, is the system automatically generated, what is its role???
If you want to know what it is, delete it and try it out, and then you will find that you cannot use the server control on page Xxx.aspx.cs (then the role of Xxx.aspx.designer.cs file is known, is registered server control), if I still do not want this file to do??
Answer: Add protected global::system.web.ui.htmlcontrols.htmlform Form1 on Xxx.aspx.cs page; Here, take the Form1 control as an example
F5 (Debug) and server controls