Web Design Patterns in aspnetforums code

Source: Internet
Author: User
Has not understood the design pattern in the Aspnetforums, the massive use custom control, the N-per structure appears too complex. Beginning to think it was because of the load user def skin, today I stumbled upon an article in the Microsoft China Community, address http://www.microsoft.com/china/community/Column/93.mspx After reading, I understand some. Compare articles and Aspnetforums code to benefit a lot.
The article reads as follows:
Column Works
Understanding Web Design Patterns
Shangjian
--------------------------------------------------------------------------------
Understanding Web Design Patterns
This article is published in the "Program Spring and Autumn" 2004 1
Summary
This article describes the. NET Framework, some basic methods and key points of improving WebForm programming with web design patterns are presented.
Key words
design mode, Asp.net,webform,mvc,page Controller,front controller,page Cache
Directory
? Introduction
? The classic WebForm architecture
? Design Patterns
? WebForm in the MVC pattern
? WebForm in Page Controller mode
? WebForm in Front Controller mode
? WebForm in Page cache mode
? Reference Resources
? Download Address
? Author information
Introduction
Remember when Microsoft just launched ASP.net, the shock is that the development of Web programs is no longer to write traditional Web pages, but like the construction of applications, so Microsoft called WebForm. But two years later today, a considerable number of developers still use the idea of writing scripts to build one after another webform, but did not play out the advantages of ASP.net, this article hope that through examples can inspire readers some new ideas.
Due to its limited space, it is not possible for this article to show the reader a webform with a design pattern through a complex web application, but if it is only a small program, there is no need to use the pattern. For the sake of understanding, it is hoped that you can imagine it as a small module in a large system (if the code is part of a large system, then the usage pattern becomes very important).
The download address for all source programs is given at the end of this article.
The classic WebForm architecture
First look at a simple application, database design as shown below, the portal is the subject parent table, through the Portalid for One-to-many Association, the program needs to display a different subject list according to Portalid.
According to our custom of writing WebForm, first drag a DropDownList, a DataGrid, a button control on the page:
Interface (webform.aspx):
<form id= "WebForm" method= "POST" runat= "Server" >
<asp:dropdownlist id= "DropDownList" runat= "Server" ></asp:DropDownList>

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.