Complete your ASP. NET program immediately

Source: Internet
Author: User
The emergence of ASP. NET allows network programmers to completely find the feeling of "designing programs" when designing programs. Of course, more of them feel the ease of ASP. NET. However, if you do not want to be lazy, there will be no progress. If you only rely on ASP. NET's own powerful functions, rather than other means, then you will soon find that others will design programs much faster and easier than you. Now, let's learn a few ways to be lazy and let others admire you.
All those who have used ASP will remember that many functions of ASP require the implementation of some third-party components. For example, the implementation of the file upload function often uses the ASPCNUP component. Using these components not only extends ASP functions, but also greatly improves program development speed. The lazy method we introduced here is to introduce several components closely related to our design.
I. Super Data Table: SuperDataGrid
The DatGrid provided by ASP. NET is powerful and easy to customize. However, it is not designed specifically for database applications. Therefore, when connecting to the database, we have to first connect to the database and then bind the data. SuperDataGrid is designed specifically for databases. Therefore, we do not need to write the complicated database connection. Yes
SuperDataGrid simplifies some properties of the DataGrid. Using this control, we can conveniently display, sort, and modify data in the database. These functions can be implemented with just a few lines of code. Let's take a look at its usage.
1) display data tables
The following code demonstrates how to use SuperDataGrid to easily display all data in a data table:
<% @ Register TagPrefix = "Super" Namespace = "Superexpert. Data"
Assembly = "Superexpert. SuperDataGrid" %>
<Super: SuperDataGrid
ConnectionString = "Server = localhost; UID = demo; pwd = secret; database = pubs"
TableName = "Titles"
Runat = "Server"/>
For more information, see:
Http://www.superexpertcontrols.com/superdatagrid/samples/sample1.aspx
Now, let's analyze the above code. First, call the SuperDataGrid control, which will be used in future examples. The second row is similar to the standard DataGrid. Let's look at some attributes of the SuperDataGrid:

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.