F5 (Debug) and server controls

Source: Internet
Author: User

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

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.