.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> ASP.NET >> Post New Resource Bookmark and Share   

 Subscribe to Articles

28 ASP.NET tips

Posted By:nishithraj       Posted Date: November 27, 2009    Points: 25    Category: ASP.NET    URL: http://www.dotnetspark.com  
 

28 tips for ASP.NET programming.


1) Go for Javascript validations instead of validation controls
2) Use Javascript instead of VBscript.
3) Minimize the use of Forms authentication.
4) Use Connection Pooling and Object Pooling
5) Turn off Tracing unless until required
6) Turn off Session State, if not required
7) Disable View State of a Page if possible
8) Set debug=false in web.config
9) Avoid Response.Redirect as many places
10) Use the String builder to concatenate string
11) Avoid throwing exceptions. try to handle the exceptions without try catch.
12) Use Finally Method to kill resources
13) Avoid unnecessary round trips to the server
14) Use Gzip Compression
15) Use Page Output Caching and Proxy Servers
16) Use Per-Request Caching
17) Use Page.ISPostBack
18) Avoid Unnecessary Indirection
19) Use "ArrayLists" in place of arrays
20) Place StyleSheets into the Header
21) Put Scripts to the end of Document
22) Make JavaScript and CSS External
23) Use DataReader instead of Dataset
24) Make Enableviewstate property as false for the components (particularly for heavy items like datagrid, datalist etc) if it is not necessary.
25) Use xmlhttprequest object or scriptmanager to minimize post backs.
26) Declare regions for each section of codes.
27) Try to use datarepeater than any other data controls.
28) Use skins files.

 Subscribe to Articles

     

Further Readings:

Responses
Author: Amit Mehra         Company URL: http://www.dotnetspark.com
Posted Date: November 28, 2009

Hello Nishithraj,

Nice piece of information and every Asp.net user must follow. but i disagree with the 1st point "1) Go for Javascript validations instead of validation controls" because if the javascript disable in the client browser than validation will not occur.

Where as if developer use ASP.net validation control and javascript is disable in the client side than the validation will occur in the server side depend upon the javascript enable or disable in the client browser. So ASP.Net validation control solve both the purpose.

Hope you agree with me

Regards
Amit

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend