VS2010 make a simple asp.net website _ Practical Skills

Source: Internet
Author: User
Tags visual studio 2010

Straight into the subject:

Open the Visual Studio 2010 program development Software

Click the file in the menu bar and select the new-> Web site->asp. NET empty site, where we choose the empty site, for the future DIY their own website, what is the best from the beginning, easy to understand the various types of architecture (if you choose ASP.net Web site, but it has integrated a number of things)

Here our default solution name is WebSite1, click OK to enter the site's code page, in the right Solution Explorer, there is only a Web.config file, which is used to make the site global settings

Web.config is actually an XML document that has a lot of configuration nodes configured in various properties. For example, a database connection string node to set the database connection such as IP address, port, login username and password and other related information, in the diagram shows only the use of the environment is NETFramework 4.0

Right-click the solution, and left-click to select Add New item to eject the following window. Here are a lot of page elements, here we introduce the most Web forms, select a good Web form and click Add

In the right Solution Explorer there is Default.aspx and its subordinate CS source code Default.aspx.cs, where CS source code and Web pages are easy to design and program

Click the split in the lower left corner and we'll see the code and Web interface of the Web interface.

Click the Toolbox on the left, and then click the Toolbox under Menu bar view to open the following interface

Drag a button and a textbox to the bottom of the Web interface on the toolbar

Double-click the button control to open the CS source page (which is actually the Default.aspx.cs above) and add code for the button control

Click the menu bar Debug-> execution, the site's preview page appears, click the button, the textbox will display the text in the code

The last step is to publish the site, click the menu bar to generate-> publishing site, in the target location to fill out the site server address or local disk address, generate the site all files will be uploaded to the appropriate location, the site can operate

Ten steps to teach you to use VS2010 to make a simple ASP.net website, I hope to help you learn.

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.