Wednesday, February 8, 2012

Tips for Asp.net Web Development




  • Go for Javascript validations instead of validation controls


  • Use Javascript instead of VBscript.


  • Minimize the use of Forms authentication.


  • Use Connection Pooling and Object Pooling


  • Turn off Tracing unless until required


  • Turn off Session State, if not required


  • Disable View State of a Page if possible


  • Set debug=false in web.config


  • Avoid Response.Redirect as many places


  • Use the String builder to concatenate string


  • Avoid throwing exceptions. try to handle the exceptions without try catch.


  • Use Finally Method to kill resources


  • Avoid unnecessary round trips to the server


  • Use Gzip Compression


  • Use Page Output Caching and Proxy Servers


  • Use Per-Request Caching


  • Use Page.ISPostBack


  • Avoid Unnecessary Indirection


  • Use "ArrayLists" in place of arrays


  • Place StyleSheets into the Header


  • Put Scripts to the end of Document


  • Make JavaScript and CSS External


  • Use DataReader instead of Dataset


  • Make Enableviewstate property as false for the components (particularly for heavy items like datagrid, datalist etc) if it is not necessary.


  • Use xmlhttprequest object or scriptmanager to minimize post backs.


  • Declare regions for each section of codes.


  • Try to use datarepeater than any other data controls.


  • Use skins files.




  • 1 comment: