ASP's super successor ASP. NET

Source: Internet
Author: User

As A. Net Technical expert Paul litwin: among all development tools related to. net, ASP. NET may be the most valuable. Its significance has already exceeded pure tools, and has become the ultimate goal of other tools to develop. NET platform network applications. ASP. NET is undoubtedly a convenient corridor for direct access to the. NET core.

Introduction to ASP. NET

As. NET architecture is the most important web development tool, Asp. net cannot be regarded as the next version of ASP. the position in the net architecture is the same as the position of JSP in the Java architecture, so it is duty-bound to provoke the mission of competing with JSP. Moreover, with the help of Microsoft, ASP. NET has become a unified web application development specification, which can utilize all. net resources and work together with all. NET development tools.

APs. Net has built-in various elements for developing Web applications, including various controls for developing mobile device software, which enables APs. net to be competent for developing various web applications. Although the APs. Net syntax is largely compatible with ASP, they are essentially far different. APs. Net has become a new programming model that can generate applications with better scalability and stability.ProgramAnd provides reassuring security features. Similar to JSP, ASP. NET is compiled into the middle of. Net during the first execution.CodeAnd then passed to the CLR for execution. The execution efficiency is much higher than that of the sentence-by-sentence execution ASP. ASP. NET was integrated into the Microsoft Visual Studio. NET integrated environment at the beginning, enabling it to fully share development resources, and programmers can also use their familiarProgramming LanguageDeveloping APs. net programs does not have to stick to a specific scripting language or development environment like ASP.

Although the. NET cross-platform architecture is far from being achieved, its vitality and popularity have remained unchanged from that of Java. Deep. net benefits. net to greatly assist ASP. net, with its excellent performance and brand new appearance, is attracting more and more web designers to use it, and also makes a large number of programmers from the same path it by disturbing.

How to Learn

For those who already have ASP design knowledge, learn ASP. net is relatively easy, but it is also very limited. After all, Asp. net and ASP are still quite different, especially in terms of design methods. In this regard, Visual Studio Programmers take advantage of the advantage of ASP. net is the most commonly used code language.. NET and C #, while Visual Studio. all programming languages of net can support ASP. net program development, even if the programmer on ASP. net has little knowledge about details, and can also develop powerful web applications.

1. You can skip ASP.

Beginners can skip ASP to directly learn ASP. NET, because the foundation laid in ASP is not very useful for learning ASP. NET. Since ASP. net Works in. NET architecture, so Beginners should deal with it. net knowledge, although this knowledge is difficult to understand in the first contact, but once entered. NET programming world, many difficult things are suddenly known.

2. master a development language

Because ASP. Net is a web program development environment rather than a development language, its code needs to be written in other languages, so beginners must master a Visual Studio. NET development language. Of course, beginners do not have to worry about this, an ASP. net only uses C # Or VB. net and other basic content, it is relatively easy to master this part of the content, the second is Visual Studio. net has been a large number of zookeeper feeding to see the south of the Yangtze River has been turbulent 0 yunyun zookeeper pseudo zookeeper sp. net program framework, with the help of a large number. NET Component, you can complete ASP without writing or writing very little code. net program development. Therefore, ASP. NET is both ugly and terrible. On the contrary, its simple, clear, easy to learn and easy to use features will attract a large number of friends interested in Web application development.

3. Select a tool

Develop ASP. net's main tool is naturally not Microsoft's Visual Studio. NET 2003 does not belong to, because ASP. net has been completely the same as Visual Studio. NET 2003 Integrated, Asp.. Net program development can use Visual Studio. NET 2003 resources, including the complete debugging environment. With the successful transformation of Borland's development tool to the. NET architecture, the Delphi 2005 launched by Borland has also achieved remarkable performance in the Development of ASP. NET programs.
The fans of HI will no longer be troubled by changing their guns. Of course, Dreamweaver 2004 can also be used to edit ASP. NET web pages, but it cannot be compared with Visual Studio. NET 2003 and Delphi 2005 in code writing and debugging.

ASP. NET example

Here is a simple example of ASP. NET accessing sqlserver database, so that beginners can have a preliminary understanding of ASP. NET features and development methods.

First, create a database named gdzc2004 in sqlserver 2000 and create the gdzc2004_sy data table under it. Start Visual Studio. NET 2003 and create an ASP. NET web application project of Visual C. Visual Studio. NET 2003 automatically creates an ASP. NET program framework and displays webfor
M blank form for editing. Click the Toolkit button on the left and select the "data" page on the Toolkit.

Drag the oledbdat aadapter component to the form. The data adapter Configuration Wizard is displayed. Click "Next" in the wizard, and then click "New Connection". The "Data Link Properties" dialog box is displayed. In the dialog box, enter the server name, logon username, and password, and select gdzc2004 database. Click "Next" and select "use SQL statement. Click "Next" to display the "generate SQL statement" window. You can directly enter the SQL query statement "select * From gdzc200" in the editing box.
4_sy. You can also click the "Query Builder" button to generate it using the wizard. After the data adapter is configured, select the newly generated oledbdataadapter1 in the form, click "generate dataset" in the attribute box, and select the default value in the pop-up dialog box, after confirming, generate dataset11 in the form. Select the "Web Forms" page in the toolbox, drag the DataGrid component to the form, set datasource to dataset11 In the attribute box, And datamember to gdzc2004_sy. You can also click the "Property generator" item below to further modify and adjust the appearance style of dataset11. The final interface 1 is shown.

Press F7 to open the webform1.aspx. CS code window. In the page_load function, enter:

Oledbdataadapter1.fill (dataset11, "gdzc2004_sy"); // fill the dataset
Datagrid1.databind (); // Data Binding
As long as there are only two statements, the entire program is compiled, and the execution result 2 in IE is shown.
The entire program Source code As follows:
Using system;
Using system. collections;
Using system. componentmodel;
Using system. Data;
Using system. drawing;
Using system. Web;
Using system. Web. sessionstate;
Using system. Web. UI;
Using system. Web. UI. webcontrols;
Using system. Web. UI. htmlcontrols;
Namespace webapplication4
{Public class webform1: system. Web. UI. Page
{Protected system. Data. oledb. oledbd
Ataadapter oledbdataadapter1;
Protected system. Data. oledb. oledbco
MmAnd oledbselectcommand1;
Protected system. Data. oledb. oledbco
MmAnd oledbinsertcommand1;
Protected system. Data. oledb. oledbco
Nnection oledbconnection1;
Protected webapplication4.dataset1 dataset11;
Protected system. Web. UI. webcontrols. DataGrid datagrid1;
Private void page_load (Object sender, system. eventargs E)
{Oledbdataadapter1.fill (dataset11, "gdzc2004_sy ");
Datagrid1.databind ();}
Override protected void oninit (eventar
Gs e)
{Initializecomponent ();
Base. oninit (E );}
Private void initializecomponent ()
{// The code is automatically generated by Visual Studio. NET 2003 based on user settings, so it is omitted.
......}
}
}

We can see that in Visual Studio. ASP. NET 2003 Integrated Environment Development. net program is very convenient for beginners, even a glimpse of ASP. net Portal can also use powerful wizard and template to quickly develop ASP.. Net program.

ASP. NET is more in line with the programmer's work habits than ASP, so that the programmer can write the code part with a dedicated mind, And the HTML interface is handed over to a dedicated designer.

Learning Resource recommendation

ASP. NET is the most authoritative document in msdn, but Microsoft's programming materials have always been unfamiliar with beginners. Even a veteran reads something like a fall in the fog. Fortunately, there are many enthusiastic people at home and abroad. After completing ASP. NET, I will write a simple guide to bring beginners to the ASP. NET programming world step by step. The two books are described below.

ASP. NET developer guide, published by China Power Publishing House, priced at 48 RMB. This book is one of the earliest books about ASP. NET. It is very popular for beginners because of its comprehensive content, reasonable chapter arrangement, and clear and easy-to-understand explanations. The quality of the Chinese translation is also very good. It can be seen that the translator has a deep technical and language literacy, which is worth seeing.

ASP. NET full manual, published by the Electronic Industry Publishing House, with a price of 59 RMB. This is also a translation book and a full book series. This book covers all aspects of ASP. NET and is suitable for reference at hand.
ASP. NET Resources site is very much, in addition to http://www.msdn.com, http://www.cncode.com (source China), http://www.csdn.net, http://dev.yesky.com/msdn/msdnasp/ (day ASP. net columns), http://www.ttxx.com and so on are quite good, most of the difficult problems in programming can find the answer from them.

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.