I have sorted out the ASP. Net Portal starter kit code for your reference.

Source: Internet
Author: User

After several weeks of hard work ASP. NET portal Starter Kit OfCodeAnd the database. The compiled code is different from the original one:

1, Added comments for my understanding. (If you have any misunderstanding, please point it out)

2, Organize the code into a pattern that I prefer, such:

It is written in the background code of the page like this:

// Page class Constructor

Public Cdefault () {

Page. init+ = NewSystem. eventhandler (page_init );

}

Private Void Page_load ( Object Sender, system. eventargs E) {

}

Private Void Page_init ( Object Sender, eventargs E) {

Initializecomponent ();

}

Private Void Initializecomponent () {

This. Load+ = NewSystem. eventhandler (This. Page_load );

}

I'm used to writing VS The method provided automatically. What is better ?) :

Private Void Page_load ( Object Sender, system. eventargs E)

{

}

Override Protected Void Oninit (eventargs E)

{

Initializecomponent ();

Base. Oninit (E );

}

Private Void Initializecomponent ()

{

This. Load+ = NewSystem. eventhandler (This. Page_load );

}

3,I used the date Selection Control for input with an announcement equivalent period;

4,Fixed threeBug:

1. The label items cannot be moved up or down (details are provided here );

2. A major security risk (described in this article ).

3. An error occurred while viewing the documents uploaded to the database.

5 . No code shown in the mobile browser device is available. My mobile simulator cannot be used (it can be started, enter the URL to indicate that the page cannot be found. Why ?)
6 , database unchanged, use the original version.



The next step is to refactor the code. First, we need to separate the data access code and use itData Access BlockCode simplification (too much redundant code in it, so I am tired of commenting); it seems that no user has changed the password (such a useful function)MSDo not take into account), must add; some pages can be inherited from a page base class (such as the editing page of the user module), can save writing a lot of code; and ......, Please give more suggestions for improvement.



Code:Download>


For more information, click here> 

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.