ASP. NET 2.0 Database Development Features

Source: Internet
Author: User

The first time I used asp.net 2.0, it was attracted by its powerful functions and ultra-high efficiency. The originally complicated process was simplified to an untrustworthy one, according to Microsoft, the official version of vs2005 in December will bring us a stronger Storm. After gradually exploring asp.net 2.0, I want to talk to you about the problems and experiences I found in my learning. Disclaimer: All the demo examples in this article are based on visual web developer 2005 express beta2. visual web developer 2005 express edition beta2 is a simple, easy to learn and easy to use development tool, it focuses on Internet application development.

New Features of asp.net 2.0 database development:

Compared with earlier versions, asp.net 2.0 has added more features, greatly improving the efficiency, management, scalability, and performance of developers.

In terms of development efficiency, asp.net 2.0 reduces the amount of code in a typical web application by 70%, you can even implement the required functions in some simple programs without writing any code. This is called "0 code ". This is because asp.net 2.0 encapsulates common web tasks into application services and controls that can be easily reused between websites. Using these basic generation blocks is much less user-defined code than in earlier versions to implement many applications.

At the same time, many new server controls are introduced in asp.net 2.0 to provide powerful declarative support for data access, login security, wizard navigation, menus, tree views, portals, and so on. Many of these controls use asp.net's core application services for data access, membership and role, and personalized settings.

New features in version 2.0 are as follows:

· Data Source Control-asp.net 2.0 introduces declarative data source controls that expose the Data Binding ui controls on the page to backend storage such as SQL databases, intermediate layer business objects, or xml files). The data source control also provides functions such as sorting, paging, caching, updating, inserting, and deleting data. The ui control can automatically use these functions without code.

· New data binding control-in addition to the data binding control in asp.net 1.x, asp.net also includes new data binding ui controls such as gridview, detailsview, formview, treeview, and menu, you can customize these controls to display data in various formats. The gridview, detailsview, and formview controls can also automatically use the data source function, making it easy to add sorting, paging, and update operations to the data driver page.

· Data Control parameters-the data source can use the data control parameter object in asp.net 2.0 to accept input parameters from various sources. Using these parameter objects, you can easily provide server control property values, sessions, applications, cookies, querysspaning fields, and user configuration file attributes to parameterized data operations. With these parameters, you only need a small amount of custom code or no need to customize code to support filtering and master/detail schemes.

· Improved data binding syntax-for common solutions to bind controls to Data Binding templates, The databinder. eval Data Binding syntax in asp.net has been simplified. You can also associate two-way data binding with control properties in the template to allow automatic transfer of values to the data source for update, insert, or delete operations. For Hierarchical xml data, asp.net 2.0 also contains an xpath-based Data Binding syntax.

· Use the SQL express local file database-to simplify development, asp.net 2.0 now supports the ability to connect to the SQL express database as a local file in an application, this eliminates the need to provide databases to servers for development purposes only. Of course, you can still connect to the server-based SQL database.

ASP. NET 2.0 database development: detailed introduction to some important data binding controls and data source controls

· Gridview:

This is a new data binding control in asp.net 2.0. It is the subsequent inheritance of the datagrid Control in asp.net 1. x and has made many improvements based on it. Although the datagrid Control in asp.net 1.x already allows developers to process some operations, such as sorting, paging, editing, and deleting data through code. But when the gridviwe control is bound to the data source control, it can automatically sort, pagination, edit and delete a series of data processing. In terms of functionality, the gridviwe control also surpasses the datagrid Control. The gridviwe control supports multiple key fields and provides powerful user customization functions on the ui interface, it also provides developers with a new model for canceling and processing events.

· Sqldatasource:

The sqldatasource control represents a data source control that connects to the sqldatabase provider through ado.net. Like other data source controls, the sqldatasource control can be bound to any data binding control that supports the performanceid attribute. At the same time, sqldatasource has the ability to describe itself (such as selection, insertion, update, deletion, and sorting), and even the data binding control can automatically implement selection when these capabilities are allowed, insert, update, delete, sort, and so on. The sqldatasource control allows you to replace the large amount of ado.net code that was previously required when creating database connections and implementing queries. This is because the query operation of these data has been directly specified as an attribute of the data source control. Because the data query still exists in the page code, sometimes we call it a dual model.

The sqldatasource control is usually intended for small and personal sites that do not need to query a large number of databases. When we develop a website with large data traffic, we must use the objectdatasource control, this is a data source control developed for large enterprises bound to the intermediate layer object. Data Source Control

The data source control is not rendered, but represents a specific back-end data storage, such as a database, business object, xml file, or xml web services. The data source control also supports various data-related functions, such as sorting, paging, filtering, updating, deleting, and inserting. The data binding ui control can automatically use these functions.

The above describes the main features of ASP. NET 2.0 database development.

  1. Sun expands the Open Network System Architecture
  2. ASP. NET Overview
  3. Analysis of ASP. net ajax Components
  4. Installation and simple configuration of ASP. NET AJAX
  5. Analysis on the AutoComplete control of Asp.net Ajax Control

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.