. Net Basics

Source: Internet
Author: User
1: When the command calls the stored procedure, if the output is dataset, Selectcommand Command object Connection It should be pointed out first, otherwise catch will be empty for a lifetime ..

2: If the varchar field of the stored procedure isX. xThis format is prone to subtle silly errors. Do not miss it [].

3: if the events of the default server control of the ascx file are not overwrittenNo automatic delivery! Remember.

4: page. registeronsubmitstatement is used in the ascx file...

5: viewstate has soared a lot of useless data in the true state...

6: clearly understand the order of events, such as the difference between onsubmit and onclick...

7: Pay attention to the relationship between page_load and _ dopostback,

8: If you dynamically load ascx on the page, you can clearly identify the operations to be performed by page_init. Do not abuse user control and custom Server Control (Key Points)

9: The CS file framework should be clear, and the final integration should be completed.

10. If you use a third-party online editor, you 'd better use the framework. OK ?!

11: do not add a comma to the source after compiling multiple CS files.

12: JS loaded in the fifth point can be developed independently. In onsubmit, because the form has only one ascx,

13: system errors are all marked with error codes (which can be written in the help document of the XML document later, and can be shared in multiple languages). This is a good idea.

14: when the control uses loadcontrol, the page attributes are not recognized, and only the inhert of the page is modified.

15: Pay attention to this stored procedure:

Create proc spage
@ Pagesize int,
@ Destpage int
As
Set nocount on
Declare @ ID int
Declare @ startid intselect @ startid = (@ destpage-1) * @ pagesizeset rowcount @ startid
Select @ ID = ID from [crm_articler] Set rowcount @ pagesize
Set nocount off
Select * From t_member where ID> @ ID order by ID
Go

The()Whether there is a great relationship.

16: do not try to modify the global variable in page_load. It does not have that function.

17: with a tone of uncertaintyProgramThe necessity of not reading.

18: the background uses the framework techniques (style, JS, and class) to be reasonably arranged. Try to leave the background as independent as possible without relying on some front-end namespaces or classes.

19: Using (context = system. Web. httpcontext. Current)

20: Try to make the compiled output file concise and independent. The function is to compile a module into a file, but do not open the module (usercontrol) and common, because usercontrol has assembly problems.

21: Reading XML files from a disk is very slow. Do not always read the files. You can put them in the cache.

22: The reader or datareader must read the file.Close ();

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.