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.