Brief analysis on the process of creating and releasing ASP.net website--Practical skills

Source: Internet
Author: User

First, simple Web site creation:
1. First Open VS,
2. Document--"new--" website--"ASP."
3. The system will generate a default.aspx file by default, the contents of the file are as follows:

<%@ Page language= "C #" codefile= "Default.aspx.cs" inherits= "_default"%> <!

DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

 
 

4. We can through the "design" mode, drag and drop to complete the page design, the code will be automatically generated.
5. Here, we drag a lable control to display "Hello" when the page loads.
6. After dragging the controls, we found "Default.aspx.cs", the code file, to complete the writing of the event. "Here's the idea of separating the code from the page."
The code is as follows:

Using System;
Using System.Data;
Using System.Configuration;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using System.Web.UI.WebControls;
Using System.Web.UI.WebControls.WebParts;
Using System.Web.UI.HtmlControls;

public partial class _default:system.web.ui.page 
{
 protected void Page_Load (object sender, EventArgs e)
 {
 Label1.Text = "Hello";

 }
}

At this point, code writing is complete.
Second, deployment.
Deployment is mainly divided into two ways, one for debugging the random debugging; one for formal deployment.
How to deploy this machine:
"Debug"-"Start Debugging"-"Add a new debug-enabled Web.config file"-"OK;"
The deployment has been completed at this time. This method can also be run without IIS on this computer.
Formal Deployment mode:
Build-"Build Web Site": A DLL file and a paging file are generated at this time.
"Generate"-"Publish Web Site": Select the path to publish--"OK;"
This is where we move to the path and you can see the following figure:

We can copy the generated files and put them in a directory on the server to be published.
Click on the directory and right-click to select "Properties"-Web Sharing tab

Shared location "Default Web Site", click "Shared Folder", which will pop up

Alias can be arbitrary, click "OK", run in IIS.

The above is the asp.net of the creation and release process, is not the operation is very simple, hurry to release their own site to try it!

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.